Skip to content

CString

A CString object consists of a variable-length sequence of characters. CString provides functions and operators using a syntax similar to that of Basic. Concatenation and comparison operators, together with simplified memory management, make CString objects easier to use than ordinary character arrays.

About

CString 은 CObject에서 상속을 받지않고 Simple Value Types의 하나이다. CString Object 는 문자들의 가변적인 길이의 연속으로 구성되고, 문자 배열보다 사용하기가 쉽다. CString은 TCHAR 데이터 타입을 기초로 하고 있다.

The String as an Array

  • GetLength(): 설정된 문자열의 길이를 리턴
  • IsEmpty(): 문자열의 버퍼가 비워져 있는지를 검사
  • Empty(): 문자열을 삭제하여 버퍼를 비운다.
  • GetAt(): 특정위치의 문자값을 얻는다.
  • SetAt(): 특정위치의 문자값을 설정한다.

Comparison

  • Compare(): 대소문자를 구분한 문자열 비교.
  • CompareNoCase(): 대소문자를 구분하지 않는 문자열 비교.
  • Collate():
  • CollateNoCase():

Extraction

  • Mid(): 문자열의 중간부분을 추출한다.
  • Left(): 문자열의 왼쪽부분은 추출한다.
  • Right(): 문자열의 오른쪽부분을 추출한다.
  • SpanIncluding(): 포함된 문자를 추출.
  • SpanExcluding(): 포함되지 않는 문자열 추출.

Other conversions

  • MakeUpper(): 소문자를 대문자로 바꾼다.
  • MakeLower(): 대문자를 소문자로 바꾼다.
  • MakeReverse(): 문자를 reverse 시킨다.
  • Replace():
  • Remove(): 문자를 제거한다.
  • Insert():
  • Delete():
  • Format(): 문자열 Format 저장.
  • FormatV():
  • TrimLeft():
  • TrimRight():
  • FormatMessage():

Serching

  • Find(): 문자의 인덱스를 찾아 반환한다.
  • ReverseFind(): 뒤에서부터 찾는다.
  • FindOneOf():

Buffer Access

  • GetBuffer():
  • GetBufferSetLength():
  • ReleaseBuffer():
  • FreeExtra():
  • LockBuffer():
  • UnlockBuffer():

See also

Favorite site