摘要 |
PROBLEM TO BE SOLVED: To accurately acquire the character string size of the entire processing object character string including characters for which the number of the characters in the case of being converted into half size characters is different from the number of bytes. SOLUTION: A half size character number counter and a byte number counter are initialized to 0 (S11) and the number of the bytes of the entire processing object character string is acquired (S12). Then, the [byte number counter + 1]-th byte of the processing object character string is acquired (S21), the character kind of one character starting from the acquired one byte is judged (S22 and 23) and the value of the half size character number counter and the value of the byte number counter are updated based on the character kind (S31, 32 and 33). Then, whether or not the value of the byte number counter is equal to or more than the number of the bytes of the entire processing object character string is judged (S41). The processings of S21-S41 are repeated until the judged result of S41 becomes 'YES'. Finally, the value of the half size character number counter is outputted as the character string size of the processing object character string (S42). |