Statistical memo controls the number of strings in
Requirements: 1. The content includes digital punctuation marks in English and in Chinese
2. Every character counts as a number, such as "hello"=2;" Hello, Beijing "=5;" He "=4,
3. The total number of the inside of the statistical characters,
4. Before the 1-70 into the memo1, 70-140 in memo2, 140-210 in memo3, more than 210 tips out of range,
How to do...
CodePudding user response:
Traverse yourself, with storage String, the String word (String [odd]) & gt; For 128 Chinese characters, otherwise the ASCII, because the first byte is more than 128 Chinese characters,CodePudding user response:
The key is I don't know how to the statistical characters and characters that several digitalUse a character length only statistical number to
And 1-70 before go out with what function?
CodePudding user response:
The Memo text into AnsiString type, with Length can calculate the total Length of the characters,And then COPY the former 69 characters to MEMO1, judge the 70th character is a single character or 71 characters is one of the, doing operation
CodePudding user response: