ABOUT ME

-

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

    #Insert

    //지정한 위치에 새로운 문자열을 삽입.

    System.UnicodeString.Insert

    C++

    UnicodeString& Insert(const UnicodeString& str, int index) _ALWAYS_INLINE {

    Properties

    Type

    Visibility

    Source

    Unit

    Parent

    function

    public

    ustring.h

    System

    UnicodeString

    Description

    Inserts a specified string into UnicodeString.

    Insert inserts the string str into this UnicodeString object beginning at the position index, where 1 is the first position in the string. It returns the resulting modified string (*this).

    If index is less than 1, it is mapped to a 1. If it is past the end of the string, it is set to Length, turning the operation into an append.

    If the str parameter is an empty string, Insert does nothing.

    Insert throws an EOutOfMemory exception if the method is unable to allocate enough memory to accommodate the new, longer string.

    Note: The index parameter always specifies the character index, not the byte index.


    ex){

    UnicodeString TestString = "This is String";

    ShowMessage(TestString.Insert("Test ",9));


    }

    728x90

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

    Pos  (0) 2018.12.06
    Delete  (0) 2018.12.06
    Length  (0) 2018.12.06
    sprintf  (0) 2018.12.06
    c_str  (0) 2018.12.06

    댓글

Designed by Tistory.