Delphi string characters commonly used string handler function:
| Description |
Old notation (Windows platform) starts from 1 |
New notation (across all platforms) starting from 0 |
| Insert String |
Insert (' str ', str, 1); |
STR: = Str.insert (0, ' str '); |
| Delete a string |
Delete (STR, 1, 1); |
STR: = Str.remove (0); STR: = Str.remove (0, 1); |
| Copy a string |
str: = Copy (str, 1, 2); |
STR: = str.substring (0, 2)); |
| Turn into uppercase |
Uppercase (STR); |
STR: = Str.toupper; |
| Turn into lowercase |
lowercase (STR); |
STR: = Str.tolower; |
| repeating characters |
Stringofchar ('-', 15); |
STR: = String.cretae ('-', 15); |
| Find sub-characters |
Pos (' ABC123 ', Str); |
I: = Str.indexof (' ABC123 '); |
| It's these words. |
Charinset (str[1], [", #13]); |
Str.chars[0]. Isinarray ([' ', #13]); |
| Watchmaking a swastika of the tortoise |
Organize these first, and then slowly organize the others.
Delphi string characters commonly used string character handler function