전산쟁이의 카피질

뒤로 검색

stl string 유용한 함수

2009/06/18 13:59

출처 : http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2896


Output

Converted string into 9 items.
Vector back to string = (happy, days, are, here, again, , , , )
original             -->  happy/days/ are /here/again////  <--
trim_right           -->  happy/days/ are /here/again////<--
trim_left            -->happy/days/ are /here/again////  <--
trim                 -->happy/days/ are /here/again////<--
tolower              -->  happy/days/ are /here/again////  <--
toupper              -->  HAPPY/DAYS/ ARE /HERE/AGAIN////  <--
tocapitals           -->  Happy/Days/ Are /Here/Again////  <--
GetWord              -->happy<--
After GetWord, s =   -->days/ are /here/again////<--



Output

Should be true ...

Nick == nick = true
Nick >= nick = true
Nick prefix == Ni = true
Nick ci_prefix == ni = true
AABBC prefix (2) == BB = true

Should be false ...

Nick == nicky = false
Nick < aaaa = false
Nick prefix == ni = false
Nack ci prefix == ni = false
AABBC prefix (3) == BB = false

Tags

stl, string, tolower, toupper, trim
이 페이지는 Textcube 1.10.0 : beta 1 로 구동됩니다 데스크탑 화면