如何在Delphi中执行此操作?
我有一个很长的字符串.我需要每隔5个字母包装sting并在包装字符串的末尾添加一个点.
示例字符串:
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Run Code Online (Sandbox Code Playgroud)
结果:
sssss.
sssss.
sssss.
sssss.
Run Code Online (Sandbox Code Playgroud)
War*_* P 7
你的老师可能希望你学习足够多的pascal来写这样的东西:
loop through the characters in the string
get a character from the string and add it to another string
check if five letters have gone by, and if so,
add a dot and a carriage-return-and-linefeed character.
end loop
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1157 次 |
| 最近记录: |