Home > Back-end >  Ask a question on the memo controls
Ask a question on the memo controls

Time:10-01

Firstly,
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 digital
Use 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:

reference xubzhlin reply: 3/f
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 the operation can
truth... I go to try it

CodePudding user response:

reference xubzhlin reply: 3/f
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 the operation can
application ansistring type number or can't accurate judgement character... Looks like the number 12=1 character 2=half a character

CodePudding user response:

Into UnicodeString AnsiString of word, and then can operation,
  • Related