ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Pos
    C++ Builder/함수 2018. 12. 6. 22:14

    #Pos

    //지정한 문자열이 포함되어 있는 위치를 반환

    System.UnicodeString.Pos

    C++

    int             Pos(const UnicodeString& subStr) const _ALWAYS_INLINE {

    Properties

    Type

    Visibility

    Source

    Unit

    Parent

    function

    public

    ustring.h

    System

    UnicodeString

    Description

    Returns character index at which specified substring begins.

    Pos returns the character index in the UnicodeString instance at which the substring subStr begins, where 1 is the index of the first character, 2 is the index of the second character, and so on. If the substring is not contained in the UnicodeString, Pos returns 0.



    ex) {

    UnicodeString TestString = "This is Test String";

    int pos = TestString.Pos("Test");

    ShowMessage(IntToStr(pos));

    }



    728x90

    'C++ Builder > 함수' 카테고리의 다른 글

    SubString  (0) 2018.12.06
    StringOfChar  (0) 2018.12.06
    Delete  (0) 2018.12.06
    Insert  (0) 2018.12.06
    Length  (0) 2018.12.06

    댓글

Designed by Tistory.