티스토리 뷰

std::string::size   &  std::string::length

  • Parameter : none

  • Return Value : 문자열의 길이를 반환

string 클래스의 size() 멤버함수와 length() 멤버함수는 같다고 보면 됩니다.

 

 

Example :


 

output :


 

std::string::clear

  • Parameter : none

  • Return value : none

 

string 클래스의 clear() 멤버함수는 문자열을 지워, 빈 문자열을 만듭니다.

 

 


 

std::string::empty

  • parameter : none

  • Return Value : 문자열의 길이가 0이면 true, 아니라면 false를 반환

 

Example :


output :

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함