CkString Delphi DLL Reference Documentation

CkString

The Chilkat string class.

Create/Dispose

function CkString_Create: HCkString; stdcall;

Creates an instance of the HCkString object and returns a handle (i.e. a Pointer). The handle is passed in the 1st argument for the functions listed on this page.

procedure CkString_Dispose(handle: HCkString); stdcall;

Objects created by calling CkString_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function.

Properties

function CkString_getNumArabic(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Arabic characters contained in this string.

function CkString_getNumAscii(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of us-ascii characters contained in this string.

function CkString_getNumCentralEuro(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Central European and Eastern European characters found in this string. These are characters specific to Polish, Czech, Slovak, Hungarian, Slovene, Croatian, Serbian (Latin script), Romanian and Albanian.

function CkString_getNumChinese(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Chinese characters contained in this string.

function CkString_getNumCyrillic(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Cyrillic characters contained in this string. The Cyrillic alphabet also called azbuka, from the old name of the first two letters) is actually a family of alphabets, subsets of which are used by certain East and South Slavic languages "” Belarusian, Bulgarian, Macedonian, Russian, Rusyn, Serbian and Ukrainian"”as well as many other languages of the former Soviet Union, Asia and Eastern Europe.

function CkString_getNumGreek(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Greek characters contained in this string.

function CkString_getNumHebrew(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Hebrew characters contained in this string.

function CkString_getNumJapanese(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Japanese characters contained in this string.

function CkString_getNumKorean(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Korean characters contained in this string.

function CkString_getNumLatin(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Latin characters contained in this string. Latin characters include all major Western European languages, such as German, Spanish, French, Italian, Nordic languages, etc.

function CkString_getNumThai(objHandle: HCkString): Integer; stdcall;

Introduced in version 9.5.0.25

The number of Thai characters contained in this string.

Methods

procedure CkString_append(objHandle: HCkString;
    str: pbyte); stdcall;

The str is appended to end of this instance.

procedure CkString_appendAnsi(objHandle: HCkString;
    str: pbyte); stdcall;

Appends an ANSI string to the end of this instance. str should always be a null terminated ANSI string regardless of the Utf8 property setting.

procedure CkString_appendChar(objHandle: HCkString;
    c: Char); stdcall;

Appends a single ANSI character to the end of this instance.

procedure CkString_appendCurrentDateRfc822(objHandle: HCkString); stdcall;

Appends the current date/time to the end of this instance. The date/time is formatted according to the RFC822 standard, which is the typical format used in the "Date" header field of email. For example: "Fri, 27 Jul 2012 17:41:41 -0500"

procedure CkString_appendEnc(objHandle: HCkString;
    str: pbyte;
    charsetEncoding: pbyte); stdcall;

Appends a string of any character encoding to the end of this instance. Examples of charsetEncoding are: Shift_JIS, windows-1255, iso-8859-2, gb2312, etc. The str should point to a null-terminated string that uses the charset specified by charsetEncoding.

Supported Character Encodings

procedure CkString_appendHexData(objHandle: HCkString;
    byteData: pbyte;
    numBytes: LongWord); stdcall;

Converts the binary data to a hexidecimal string representation and appends to the end of this instance.

procedure CkString_appendInt(objHandle: HCkString;
    n: Integer); stdcall;

Appends the decimal string representation of an integer to the end of this instance.

procedure CkString_appendLastWindowsError(objHandle: HCkString); stdcall;

For many Win32 Platform SDK functions, such as CreateFile, error information must be retrieved by using the Win32 functions GetLastError and FormatMessage. This method calls these Win32 functions to format the error and appends it to the string.

This method would only be used by Win32 applications that call Platform SDK functions.

procedure CkString_appendN(objHandle: HCkString;
    str: pbyte;
    numBytes: LongWord); stdcall;

Appends N bytes of character data to the end of this instance. If the Utf8 property is set to True, then str should point to characters in the utf-8 encoding, otherwise it should point to characters using the ANSI encoding. Note: numBytes is not necessarily the number of characters. It is the length, in bytes, of the string to be appended. This method exists to allow for non-null terminated strings to be appended.

procedure CkString_appendNU(objHandle: HCkString;
    wideStr: PWideChar;
    numChars: Integer); stdcall;

Append N Unicode characters to the end of this instance. The wideStr points to the 2-byte per char Unicode string. The numChars is the number of Unicode characters to be appended (not the number of bytes).

procedure CkString_appendRandom(objHandle: HCkString;
    numBytes: Integer;
    encoding: pbyte); stdcall;

Appends numBytes random bytes to the end of this instance. Because arbitrary byte values in the range 0 to 255 do not necessarily represent valid characters, the bytes must be encoded to a string friendly representation such as hex, base64, etc. The encoding specifies the encoding to be used. Possible values are "hex", "base64", "quoted-printable", "asc", or "url".

procedure CkString_appendStr(objHandle: HCkString;
    strObj: HCkString); stdcall;

Appends the contents of strObj to the end of this instance.

procedure CkString_appendU(objHandle: HCkString;
    unicode: PWideChar); stdcall;

Append a Unicode string to the CkString object.

procedure CkString_appendUtf8(objHandle: HCkString;
    str: pbyte); stdcall;

Appends a utf-8 string to the existing contents of this instance. str should always be a null terminated utf-8 string regardless of the Utf8 property setting.

procedure CkString_base64Decode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

In-place base64 decodes the string and inteprets the results according to the character encoding specified.

Supported Character Encodings

procedure CkString_base64DecodeW(objHandle: HCkString;
    charsetEncoding: PWideChar); stdcall;

The utf-16 version of base64Decode.

procedure CkString_base64Encode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

In-place base64 encodes the string. Internally, the string is first converted to the character encoding specified and then base-64 encoded. Typical charsetEncoding values are "utf-8", "ANSI", "iso-8859-1", etc.

Supported Character Encodings

procedure CkString_base64EncodeW(objHandle: HCkString;
    charsetEncoding: PWideChar); stdcall;

The utf-16 version of base64Encode.

function CkString_beginsWith(objHandle: HCkString;
    substr: pbyte): wordbool; stdcall;

Return True if this string begins with substr (case sensitive), otherwise returns False.

function CkString_beginsWithStr(objHandle: HCkString;
    strObj: HCkString): wordbool; stdcall;

Returns True if the string begins with the contents of strObj. Otherwise returns False. This method is case sensitive.

function CkString_beginsWithW(objHandle: HCkString;
    str: PWideChar): wordbool; stdcall;

The utf-16 version of beginsWith.

function CkString_charAt(objHandle: HCkString;
    idx: Integer): Char; stdcall;

Returns the ANSI character at a specified index.The first character is at index 0.

function CkString_charAtU(objHandle: HCkString;
    idx: Integer): WideChar; stdcall;

Return the Nth character as a Unicode character.

procedure CkString_chopAtFirstChar(objHandle: HCkString;
    ch: Char); stdcall;

Finds the first occurance of ch and discards the characters at and following ch.

procedure CkString_chopAtStr(objHandle: HCkString;
    subStrObj: HCkString); stdcall;

Finds the first occurance of a substring and chops it at that point. The result is that the substring and all subsequent characters are removed from the string.

procedure CkString_clear(objHandle: HCkString); stdcall;

Clears the string. The string contains 0 characters after calling this method.

function CkString_clone(objHandle: HCkString): HCkString; stdcall;

Creates a copy of the string. As with any newly created Chilkat object instance returned by a Chilkat method, the returned CkString object must be deleted by the calling application.

function CkString_compareStr(objHandle: HCkString;
    str: HCkString): Integer; stdcall;

Compare two strings. A return value = 0 means they are equal. Return value = 1 indicates that calling object is lexicographically less than argument. Return value = -1 indicates that calling object is lexicographically greater than argument.

function CkString_containsSubstring(objHandle: HCkString;
    substr: pbyte): wordbool; stdcall;

Returns True if the string contains the specified substring, otherwise returns False. The string comparison is case-sensitive.

function CkString_containsSubstringNoCase(objHandle: HCkString;
    substr: pbyte): wordbool; stdcall;

Same as containsSubstring except the matching is case insensitive.

function CkString_containsSubstringNoCaseW(objHandle: HCkString;
    substr: PWideChar): wordbool; stdcall;

The utf-16 version of containsSubstringNoCase.

function CkString_containsSubstringW(objHandle: HCkString;
    substr: PWideChar): wordbool; stdcall;

The utf-16 version of containsSubstring.

function CkString_countCharOccurances(objHandle: HCkString;
    ch: Char): Integer; stdcall;

Returns the number of occurances of the specified ANSI char.

procedure CkString_decodeXMLSpecial(objHandle: HCkString); stdcall;

Decodes XML special characters. For example, &lt; is converted to '<'

function CkString_doubleValue(objHandle: HCkString): Double; stdcall;

Converts the string to a double and returns the value.

procedure CkString_eliminateChar(objHandle: HCkString;
    ansiChar: Char;
    startIndex: Integer); stdcall;

Eliminate all occurances of a particular ANSI character.

procedure CkString_encodeXMLSpecial(objHandle: HCkString); stdcall;

Encodes XML special characters. For example, '<' is converted to &lt;

function CkString_endsWith(objHandle: HCkString;
    substr: pbyte): wordbool; stdcall;

Returns True if the string ends with substr (case-sensitive). Otherwise returns False.

function CkString_endsWithStr(objHandle: HCkString;
    substrObj: HCkString): wordbool; stdcall;

Returns True if the string ends with the specified substring, otherwise returns False.

function CkString_endsWithW(objHandle: HCkString;
    s: PWideChar): wordbool; stdcall;

The utf-16 version of endsWith.

procedure CkString_entityDecode(objHandle: HCkString); stdcall;

Decodes any HTML entities found within the string, replacing them with the characters represented.

procedure CkString_entityEncode(objHandle: HCkString); stdcall;

HTML encodes any characters that are special to HTML or cannot be represented by 7-bit us-ascii.

function CkString_equals(objHandle: HCkString;
    str: pbyte): wordbool; stdcall;

Returns True if the strings are equal, otherwise returns False. (case-sensitive)

function CkString_equalsIgnoreCase(objHandle: HCkString;
    str: pbyte): wordbool; stdcall;

Returns True if the strings are equal, otherwise returns False. (case-insensitive)

function CkString_equalsIgnoreCaseStr(objHandle: HCkString;
    strObj: HCkString): wordbool; stdcall;

Returns True if the strings are equal, otherwise returns False (case-insensitive)

function CkString_equalsIgnoreCaseW(objHandle: HCkString;
    s: PWideChar): wordbool; stdcall;

The utf-16 version of equalsIgnoreCase.

function CkString_equalsStr(objHandle: HCkString;
    strObj: HCkString): wordbool; stdcall;

Returns True if the strings are equal, otherwise returns False. (case-sensitive)

function CkString_equalsW(objHandle: HCkString;
    s: PWideChar): wordbool; stdcall;

The utf-16 version of the "equals" method.

function CkString_getChar(objHandle: HCkString;
    idx: Integer): HCkString; stdcall;

Returns a new CkString object containing the Nth character. (Note, it does not contain the Nth byte, but the Nth character.) For languages such as Chinese, Japanese, etc. individual characters are represented by multiple or varying number of bytes.

function CkString_getEnc(objHandle: HCkString;
    encoding: pbyte): wordbool; stdcall;

function CkString_getEnc(objHandle: HCkString): pbyte; stdcall;

Returns the string as null-terminated ANSI.

Returns nil on failure

function CkString_getNumChars(objHandle: HCkString): Integer; stdcall;

Returns the number of characters in the string.

function CkString_getSizeAnsi(objHandle: HCkString): Integer; stdcall;

Returns the size, in bytes, of the ANSI encoding of the string.

function CkString_getSizeUnicode(objHandle: HCkString): Integer; stdcall;

Returns the size, in bytes, of the Unicode encoding of the string.

function CkString_getSizeUtf8(objHandle: HCkString): Integer; stdcall;

Returns the size, in bytes, of the utf-8 encoding of the string.

function CkString_getString(objHandle: HCkString): pbyte; stdcall;

function CkString_getString(objHandle: HCkString): pbyte; stdcall;

Returns the contents of this instance.

Returns nil on failure

function CkString_getStringAnsi(objHandle: HCkString): pbyte; stdcall;

function CkString_getStringAnsi(objHandle: HCkString): pbyte; stdcall;

Returns the string as null-terminated ANSI.

Returns nil on failure

function CkString_getStringUtf8(objHandle: HCkString): pbyte; stdcall;

function CkString_getStringUtf8(objHandle: HCkString): pbyte; stdcall;

Returns the string as null-terminated utf-8.

Returns nil on failure

function CkString_getUnicode(objHandle: HCkString): PWideChar; stdcall;

Return a pointer to memory containing the string in Unicode.

procedure CkString_hexDecode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

Hex decodes a string and inteprets the bytes according to the character encoding specified.

Supported Character Encodings

procedure CkString_hexDecodeW(objHandle: HCkString;
    charsetEncoding: PWideChar); stdcall;

The utf-16 version of hexDecode.

procedure CkString_hexEncode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

Converts the string to the character encoding specified and replaces the string contents with the hex encoding of the character data.

Supported Character Encodings

procedure CkString_hexEncodeW(objHandle: HCkString;
    charsetEncoding: PWideChar); stdcall;

The utf-16 version of hexEncode.

function CkString_indexOf(objHandle: HCkString;
    substr: pbyte): Integer; stdcall;

Returns the index of the first occurance of a substring. Returns -1 if not found.

function CkString_indexOfStr(objHandle: HCkString;
    substrObj: HCkString): Integer; stdcall;

Returns the index of the first occurance of a substring. Returns -1 if not found.

function CkString_indexOfW(objHandle: HCkString;
    s: PWideChar): Integer; stdcall;

The utf-16 version of "indexOf".

function CkString_intValue(objHandle: HCkString): Integer; stdcall;

Converts the string to an integer and returns the integer value.

function CkString_isEmpty(objHandle: HCkString): wordbool; stdcall;

Returns True if the string object is empty, otherwise returns False.

function CkString_lastChar(objHandle: HCkString): Char; stdcall;

Returns the last ANSI character in the string.

function CkString_loadFile(objHandle: HCkString;
    path: pbyte;
    charsetEncoding: pbyte): wordbool; stdcall;

Load the contents of a text file into the CkString object. The string is cleared before loading. The character encoding of the text file is specified by charsetEncoding. This method allows for text files in any charset to be loaded: utf-8, Unicode, Shift_JIS, iso-8859-1, etc.

Returns True for success, False for failure.

Supported Character Encodings

function CkString_loadFileW(objHandle: HCkString;
    path: PWideChar;
    charsetEncoding: PWideChar): wordbool; stdcall;

The utf-16 version of loadFile.

Returns True for success, False for failure.

function CkString_matches(objHandle: HCkString;
    strPattern: pbyte): wordbool; stdcall;

Returns True if the string matches the strPattern, which may contain one or more asterisk wildcard characters. Returns False if the string does not match. This method is case-sensitive.

function CkString_matchesNoCase(objHandle: HCkString;
    strPattern: pbyte): wordbool; stdcall;

Returns True if the string matches the strPattern, which may contain one or more asterisk wildcard characters. Returns False if the string does not match. This method is case-insensitive.

function CkString_matchesNoCaseW(objHandle: HCkString;
    s: PWideChar): wordbool; stdcall;

The utf-16 version of matchesNoCase.

function CkString_matchesStr(objHandle: HCkString;
    strPatternObj: HCkString): wordbool; stdcall;

Returns True if the string matches a pattern, otherwise returns False. The pattern may contain any number of wildcard '*' characters which represent 0 or more occurances of any character. This method is case-sensitive.

function CkString_matchesW(objHandle: HCkString;
    s: PWideChar): wordbool; stdcall;

The utf-16 version of the "matches" method.

procedure CkString_minimizeMemory(objHandle: HCkString); stdcall;

Minimizes the amount of memory consumed by this object. For example, consider the following: A CkString object is loaded with the contents of a text file. The "replaceAllOccurances" method is called, replacing longer substrings with shorter replacements. The actual string length will become shorter than the internal buffer space that is allocated. The minimizeMemory method will, if necessary, allocate a new internal buffer that is exactly the size needed to hold the current contents of the string, copy the string to the new internal buffer, and deallocate the old buffer.

procedure CkString_obfuscate(objHandle: HCkString); stdcall;

Obfuscates the string. (The unobfuscate method can be called to reverse the obfuscation to restore the original string.)

The Chilkat string obfuscation algorithm works by taking the utf-8 bytes of the string, base64 encoding it, and then scrambling the letters of the base64 encoded string. It is deterministic in that the same string will always obfuscate to the same result. It is not a secure way of encrypting a string. It is only meant to be a simple means of transforming a string into something unintelligible.

procedure CkString_prepend(objHandle: HCkString;
    str: pbyte); stdcall;

Prepends str to this instance.

procedure CkString_prependW(objHandle: HCkString;
    s: PWideChar); stdcall;

The utf-16 version of the "prepend" method.

procedure CkString_punyDecode(objHandle: HCkString); stdcall;

Introduced in version 9.5.0.52

In-place decodes the string from punycode.

Punycode Encoding / Decoding

procedure CkString_punyEncode(objHandle: HCkString); stdcall;

Introduced in version 9.5.0.52

In-place encodes the string to punycode.

Punycode Encoding / Decoding

procedure CkString_qpDecode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

Quoted-printable decodes the string and interprets the resulting character data according to the specified character encoding. The result is that the quoted-printable string is in-place decoded.

Supported Character Encodings

procedure CkString_qpDecodeW(objHandle: HCkString;
    charset: PWideChar); stdcall;

The utf-16 version of the qpDecode method.

procedure CkString_qpEncode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

Quoted-printable encodes the string. The string is first converted to the charset specified, and those bytes are QP-encoded. The contents of the string are replaced with the QP-encoded result.

Supported Character Encodings

procedure CkString_qpEncodeW(objHandle: HCkString;
    charset: PWideChar); stdcall;

The utf-16 version of the qpEncode method.

function CkString_removeAll(objHandle: HCkString;
    substr: HCkString): Integer; stdcall;

Removes all occurances of substr.

procedure CkString_removeCharOccurances(objHandle: HCkString;
    ch: Char); stdcall;

Removes all occurances of a specific ANSI character from the string.

procedure CkString_removeChunk(objHandle: HCkString;
    charStartPos: Integer;
    numChars: Integer); stdcall;

Removes a chunk of characters specified by starting index and length.

procedure CkString_removeDelimited(objHandle: HCkString;
    beginDelim: pbyte;
    endDelim: pbyte;
    caseSensitive: wordbool); stdcall;

Introduced in version 9.5.0.52

Remove all occurances of strings delimited by beginDelim and endDelim. Also removes the delimiters.

function CkString_removeFirst(objHandle: HCkString;
    substr: HCkString): wordbool; stdcall;

Removes the first occurance of a substring.

function CkString_replaceAll(objHandle: HCkString;
    findStrObj: HCkString;
    replaceStrObj: HCkString): Integer; stdcall;

Replaces all occurances of a substring with another. The replacement string is allowed to be empty or different in length.

function CkString_replaceAllOccurances(objHandle: HCkString;
    findStr: pbyte;
    replaceStr: pbyte): Integer; stdcall;

Replaces all occurances of a substring with another substring. The replacement string is allowed to be empty or different in length.

function CkString_replaceAllOccurancesW(objHandle: HCkString;
    pattern: PWideChar;
    replacement: PWideChar): Integer; stdcall;

The utf-16 version of the replaceAllOccurances method.

procedure CkString_replaceChar(objHandle: HCkString;
    findCh: Char;
    replaceCh: Char); stdcall;

Replaces all occurances of a specified ANSI character with another.

function CkString_replaceFirst(objHandle: HCkString;
    findStrObj: HCkString;
    replaceStrObj: HCkString): wordbool; stdcall;

Replaces the first occurance of a substring with another. The replacement string is allowed to be empty or different in length.

function CkString_replaceFirstOccurance(objHandle: HCkString;
    findStr: pbyte;
    replaceStr: pbyte): wordbool; stdcall;

Replaces the first occurance of a substring with another. The replacement string is allowed to be empty or different in length.

function CkString_replaceFirstOccuranceW(objHandle: HCkString;
    pattern: PWideChar;
    replacement: PWideChar): wordbool; stdcall;

The utf-16 version of replaceFirstOccurance.

function CkString_saveToFile(objHandle: HCkString;
    path: pbyte;
    charsetEncoding: pbyte): wordbool; stdcall;

Saves the string to a file using the character encoding specified by charsetEncoding. If a file of the same name exists, it is overwritten. For charsets such as "utf-8", "utf-16", or others that have a possible BOM/preamble, the preamble is output by default. To exclude the BOM/preamble, prepend "no-bom-" to the charset name. For example "no-bom-utf-8".

Returns True for success, False for failure.

Supported Character Encodings

function CkString_saveToFileW(objHandle: HCkString;
    path: PWideChar;
    charset: PWideChar): wordbool; stdcall;

The utf-16 version of the saveToFile method.

Returns True for success, False for failure.

procedure CkString_setStr(objHandle: HCkString;
    s: HCkString); stdcall;

Replaces the contents of the string with another.

procedure CkString_setString(objHandle: HCkString;
    str: pbyte); stdcall;

Clears the contents of this instance and appends str.

procedure CkString_setStringAnsi(objHandle: HCkString;
    s: pbyte); stdcall;

Set the CkString object from an ANSI string.

procedure CkString_setStringU(objHandle: HCkString;
    unicode: PWideChar); stdcall;

Set the CkString object from a Unicode string.

procedure CkString_setStringUtf8(objHandle: HCkString;
    s: pbyte); stdcall;

Set the string object from a utf-8 string.

procedure CkString_shorten(objHandle: HCkString;
    n: Integer); stdcall;

Discards the last N characters.

function CkString_split(objHandle: HCkString;
    delimiterChar: Char;
    exceptDoubleQuoted: wordbool;
    exceptEscaped: wordbool;
    keepEmpty: wordbool): HCkStringArray; stdcall;

Splits a string into a collection of strings using a delimiter character. If exceptEscaped is True, then delimiter chars escaped with a backslash are ignored. If exceptDoubleQuoted is True, then delimiter chars inside quotes are ignored. If keepEmpty is False, then empty strings are excluded from being added to the returned CkStringArray object.

function CkString_split2(objHandle: HCkString;
    delimiterChars: pbyte;
    exceptDoubleQuoted: wordbool;
    exceptEscaped: wordbool;
    keepEmpty: wordbool): HCkStringArray; stdcall;

Same as "split", except a set of characters can be used for delimiters.

function CkString_split2W(objHandle: HCkString;
    splitCharSet: PWideChar;
    exceptDoubleQuoted: wordbool;
    exceptEscaped: wordbool;
    keepEmpty: wordbool): HCkStringArray; stdcall;

The utf-16 version of the split2 method.

function CkString_splitAtWS(objHandle: HCkString): HCkStringArray; stdcall;

Equivalent to split2(" \t\r\n",true,true,false)

function CkString_substring(objHandle: HCkString;
    startCharIndex: Integer;
    numChars: Integer): HCkString; stdcall;

Returns a substring specified by starting character position and number of characters. (The 1st char is at index 0.)

procedure CkString_toCRLF(objHandle: HCkString); stdcall;

Converts all line endings to CRLF.

procedure CkString_toLF(objHandle: HCkString); stdcall;

Converts all line endings to bare-LF (Unix/Linux style line endings).

procedure CkString_toLowerCase(objHandle: HCkString); stdcall;

Converts the string to lowercase.

procedure CkString_toUpperCase(objHandle: HCkString); stdcall;

Converts the string to uppercase.

function CkString_tokenize(objHandle: HCkString;
    punctuation: pbyte): HCkStringArray; stdcall;

Tokenizes a string. The string is split at whitespace characters, and any single punctuation character is returned as a separate token. For example, this string:
CkStringArray *CkString::tokenize(char *punctuation) const

is tokenized to

CkStringArray
*
CkString
:
:
tokenize
(
*
punctuation
)
const

function CkString_tokenizeW(objHandle: HCkString;
    punctuation: PWideChar): HCkStringArray; stdcall;

The utf-16 version of the "tokenize" method.

procedure CkString_trim(objHandle: HCkString); stdcall;

Trim SPACE and Tab characters from both ends of the string.

procedure CkString_trim2(objHandle: HCkString); stdcall;

Trim SPACE, Tab, CR, and LF characters from both ends of the string.

procedure CkString_trimInsideSpaces(objHandle: HCkString); stdcall;

Replaces all tabs, CR's, and LF's, with SPACE chars, and removes extra SPACE's so there are no occurances of more than one SPACE char in a row.

procedure CkString_unobfuscate(objHandle: HCkString); stdcall;

Unobfuscates the string.

The Chilkat string obfuscation algorithm works by taking the utf-8 bytes of the string, base64 encoding it, and then scrambling the letters of the base64 encoded string. It is deterministic in that the same string will always obfuscate to the same result. It is not a secure way of encrypting a string. It is only meant to be a simple means of transforming a string into something unintelligible.

procedure CkString_urlDecode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

URL decodes the string and interprets the resulting byte data in the specified charset encoding.

Supported Character Encodings

procedure CkString_urlDecodeW(objHandle: HCkString;
    charsetEncoding: PWideChar); stdcall;

The utf-16 version of the urlDecode method.

procedure CkString_urlEncode(objHandle: HCkString;
    charsetEncoding: pbyte); stdcall;

URL encodes the string. The string is first converted to the specified charset encoding, and those bytes are URL-encoded. The contents of the string are replaced with the URL-encoded result.

Supported Character Encodings

procedure CkString_urlEncodeW(objHandle: HCkString;
    charsetEncoding: PWideChar); stdcall;

The utf-16 version of the urlEncode method.