*** test program for CString class
initial state:
[str1] str:"", size: 1
[str2] str:"!?Project???", size: 13
[str3] str:"Wheel ", size: 7
[str4] str:"", size: 1
set without copy:
[str1] str:"Steel ", size: 7
set with format:
[str4] str:"hello. str "S", digit: 10, hex: a", size: 34
append:
[str1] str:"Steel !?Project???", size: 19
prepend:
[str1] str:"The Steel !?Project???", size: 23
insert:
[str1] str:"The Steel Wheels !?Project???", size: 30
remove:
[str1] str:"The Steel Wheels Project", size: 25
checking result ... OK
to upper:
[upper str1] str:"THE STEEL WHEELS PROJECT", size: 25
check: "Steel ", "!?Project???", "Wheel ", "The"
remove spaces:
[before remove] str:" 
 
 a   
 
 
", size: 15
[removing head spaces ] str:"a   
 
 
", size: 10
[and removing tail spaces ] str:"a", size: 2
removing step by step
10: "0123456789"
9: "012345678"
8: "01234567"
7: "0123456"
6: "012345"
5: "01234"
4: "0123"
3: "012"
2: "01"
1: "0"
0: ""
10: "0123456789"
9: "123456789"
8: "23456789"
7: "3456789"
6: "456789"
5: "56789"
4: "6789"
3: "789"
2: "89"
1: "9"
0: ""
removing overrun
""
removing multiple spaces
"a b c
"replace characters:
"ifmmp" -> "hello"
replace char by string:
"hello" -> "heLLLLo" (7) 
replace string by string:
"heLLLLo" -> "heLLo" (5) 
split first test:
"   1stword, 2nd and 3rd   " -> "1stword," && "2nd and 3rd   "
"nospaces" -> "nospaces" && ""
" " -> "" && ""
split last test:
"dangerous usage. be careful." -> "dangerous usage. be" && "careful."
"nospaces" -> "" && "nospaces"
" " -> "" && ""
"   1stword, 2nd and 3rd   " -> "   1stword, 2nd and" && "3rd"
"" -> "" && ""
removeChar & removeStr:
"012356789"
"012389"
set "hello, world!!" to str1:
duplicate:
converting to upper cases:
"hello, world!!" -> "HELLO, WORLD!!"
"TRUE" == "true" ... OK
generate "GOOD EVENING" from "Good evening"
count spaces for " 	 hello"
 result will be 2 -> 9
count skips to remove spaces:
 result = 1
replacing formatted characters:
 before: hello\t,\nworld
 after:  hello	,
world
bye.
