String truncation method and device
A string and substring technology, applied in the computer field, can solve problems such as string truncation and garbled characters
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0063] In order to make the above objects, features and advantages of the present invention more comprehensible, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0064] In the prior art, the character string is usually truncated according to the preset maximum number of bytes, and the truncated character string may display garbled characters. In some character encoding environments, the number of bytes occupied by characters is different. For example, in UTF-8 encoding, a Chinese character occupies 3 bytes, while an English character occupies 1 byte. If the string is truncated according to the maximum number of bytes, when the truncation position is in the middle of 3 bytes of a Chinese character, the Chinese character will be displayed as garbled characters. For example, under UTF-8 encoding, set the maximum intercepted byte length MAX_CHAR_LEN=20, then the ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com