Adobe.com
Contents Suites Classes Class Index Member Index

AIUnicodeStringSuite Struct Reference
[API Suite List]

This suite provides utilities that allow you to create and manipulate Unicode strings. More...

#include <AIUnicodeString.h>

List of all members.

Public Attributes

AIAPI AIErr(* Initialize )(ai::UnicodeString &str, const char *string, ai::UnicodeString::offset_type srcByteLen, AICharacterEncoding encoding)
 Initializes a Unicode string with the contents of a C string.
AIAPI AIErr(* InitializeUTF16 )(ai::UnicodeString &str, const ASUnicode *utfs, ai::UnicodeString::offset_type srcUTF16Count)
 Initializes a Unicode string with the contents of a UTF-16 encoded string.
AIAPI AIErr(* InitializeUTF32Char )(ai::UnicodeString &str, ai::UnicodeString::offset_type count, ai::UnicodeString::UTF32TextChar ch)
 Initializes a Unicode string with a single UTF-32 code point (character) repeated a given number of times.
AIAPI AIErr(* Destroy )(ai::UnicodeString &str)
 Deletes the contents of a Unicode string, and reset it to an uninitialized state.
AIAPI AIErr(* Append )(ai::UnicodeString &str, const ai::UnicodeString &str2)
 Appends one Unicode string to another.
AIAPI AIErr(* AppendSubString )(ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Appends a sub-string of one Unicode string to another.
AIAPI AIErr(* Assign )(ai::UnicodeString &str, const ai::UnicodeString &str2)
 Assigns one Unicode string to another.
AIAPI AIErr(* Copy )(ai::UnicodeString &str, const ai::UnicodeString &str2)
 Copies one Unicode string into another.
AIAPI AIErr(* GetChar )(const ai::UnicodeString &str, ai::UnicodeString::size_type position, ai::UnicodeString::UTF32TextChar &ch)
 Retrieves the UTF-32 code point at an index position in a Unicode string.
AIAPI void(* Clear )(ai::UnicodeString &str)
 Clears the contents of a Unicode string.
AIAPI ai::int32(* Compare )(const ai::UnicodeString &str, ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Compares substrings in two Unicode strings.
AIAPI AIErr(* toLower )(ai::UnicodeString &src)
 Convert the characters in this to lower case following the conventions of the default locale.
AIAPI AIErr(* toUpper )(ai::UnicodeString &src)
 Convert the characters in this to upper case following the conventions of the default locale.
AIAPI ai::int32(* CaseCompare )(const ai::UnicodeString &str, ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Performs a caseless comparison of substrings in two Unicode strings.
AIAPI AIErr(* CanonicalCompare )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::int32 &compareResult)
 Performs a normalized comparison of substrings in two Unicode strings.
AIAPI AIErr(* CanonicalCaseCompare )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::int32 &compareResult)
 Performs a normalized, caseless comparison of substrings in two Unicode strings.
AIAPI
ai::UnicodeString::size_type(* 
Length )(const ai::UnicodeString &str)
 Retrieves the number of UTF-32 code points (characters) in a Unicode string.
AIAPI AIBool8(* Empty )(const ai::UnicodeString &str)
 Reports whether a Unicode string is empty.
AIAPI AIErr(* Erase )(ai::UnicodeString &str, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Erases characters from a Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
FindChar )(const ai::UnicodeString &str, ai::UnicodeString::UTF32TextChar ch, ai::UnicodeString::size_type startOffset)
 Searches for the first occurrence of a character in a substring of a Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
FindString )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset)
 Searches for the first occurrence of an entire string within a substring of a Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
FindSubString )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches for the first occurrence of a substring of one Unicode string within a substring of another Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
CaseFindSubString )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches for the first occurrence of a substring of one Unicode string within a substring of another Unicode string, performing a caseless comparison.
AIAPI
ai::UnicodeString::size_type(* 
RFindChar )(const ai::UnicodeString &str, ai::UnicodeString::UTF32TextChar ch, ai::UnicodeString::size_type startOffset)
 Searches for the last occurrence of a character in a substring of a Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
RFindString )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset)
 Searches for the last occurrence of an entire string within a substring of a Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
RFindSubString )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches for the last occurrence of a substring of one Unicode string within a substring of another Unicode string.
AIAPI
ai::UnicodeString::size_type(* 
FindFirstOf )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches for the first occurrence of any character from a subset of one Unicode string in a substring of another string.
AIAPI
ai::UnicodeString::size_type(* 
FindFirstNotOf )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches in a Unicode string for the first occurrence of any character that does not appear in a subset of another string.
AIAPI
ai::UnicodeString::size_type(* 
FindLastOf )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches in a Unicode string for the last character that also appears in a substring of another string.
AIAPI
ai::UnicodeString::size_type(* 
FindLastNotOf )(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count)
 Searches in a Unicode string for the last character that does not appear in a substring of another string.
AIAPI AIErr(* Resize )(ai::UnicodeString &str, ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch)
 Resizes a Unicode string to hold a given number of characters, truncating or padding it as needed.
AIAPI
ai::UnicodeString::size_type(* 
Capacity )(const ai::UnicodeString &str)
 Retrieves number of characters (UTF code points) that this string can hold without reallocation.
AIAPI void(* Reserve )(ai::UnicodeString &str, ai::UnicodeString::size_type count)
 Request to change the capacity of this string to accommodate at least the specified number of characters.
AIAPI AIErr(* SubStr )(ai::UnicodeString &subString, const ai::UnicodeString &str, ai::UnicodeString::size_type offset, ai::UnicodeString::size_type count)
 Creates a substring of a Unicode string.
AIAPI AIErr(* SwapStr )(ai::UnicodeString &str, ai::UnicodeString &str2)
 Swaps the contents of two Unicode strings.
AIAPI AIBool8(* HasSurrogates )(const ai::UnicodeString &str)
 Reports whether a Unicode string contains surrogate pairs.
AIAPI
ai::UnicodeString::size_type(* 
UTF_16 )(const ai::UnicodeString &str, const ai::UnicodeString::UTF16Char *&buffer)
 Retrieves a read-only pointer to a buffer that contains UTF-16 encoded characters in platform byte order, for a given Unicode string.
AIAPI AIErr(* GetAs )(const ai::UnicodeString &str, AICharacterEncoding encoding, ai::AutoBuffer< char > &buffer, ai::UnicodeString::size_type &bufferByteCount)
 Retrieves the contents of a Unicode string in a given encoding.
AIAPI AIErr(* InitializeZString )(ai::UnicodeString &str, ZRef zStringKey)
 Initializes a Unicode string from a ZString.
AIAPI AIErr(* Normalize )(ai::UnicodeString &str, ai::UnicodeString::NormalizedForm form)
 Normalizes a Unicode string.

Detailed Description

This suite provides utilities that allow you to create and manipulate Unicode strings.

Note:
It is recommended that you use the wrapper class, ai::UnicodeString, rather than calling these functions directly.

Member Data Documentation

Appends one Unicode string to another.

Parameters:
str The string to append to.
str2 The string to append.

Appends a sub-string of one Unicode string to another.

Parameters:
str The string to append to.
str2 The source string for the substring to append.
startOffset The 0-based character offset for the substring.
count the maximum number of characters for the substring.

Assigns one Unicode string to another.

Parameters:
str The destination string.
str2 The source string.
AIAPI AIErr(* AIUnicodeStringSuite::CanonicalCaseCompare)(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::int32 &compareResult)

Performs a normalized, caseless comparison of substrings in two Unicode strings.

Strings are case folded in a locale-independent manner prior to comparison. Uninitialized strings are equal to other uninitialized strings and empty strings, and are less than initialized, non-empty strings. (Note that this function returns a numeric value, not an error code.)

Parameters:
str The first string (left side of compare).
pos The 0-based offset for the first character of the first substring.
num The number of characters in the first substring.
str2 The second string (right side of compare).
startOffset The 0-based offset for the first character of the second substring.
count The number of characters in the second substring.
Returns:
0 if the substrings are equal.
Positive if the first substring is greater than the second.
Negative if the second substring is greater than the first.
AIAPI AIErr(* AIUnicodeStringSuite::CanonicalCompare)(const ai::UnicodeString &str, const ai::UnicodeString &str2, ai::int32 &compareResult)

Performs a normalized comparison of substrings in two Unicode strings.

Uninitialized strings are equal to other uninitialized strings and empty strings, and are less than initialized, non-empty strings. (Note that this function returns a numeric value, not an error code.)

Parameters:
str The first string (left side of compare).
pos The 0-based offset for the first character of the first substring.
num The number of characters in the first substring.
str2 The second string (right side of compare).
startOffset The 0-based offset for the first character of the second substring.
count The number of characters in the second substring.
Returns:
0 if the substrings are equal.
Positive if the first substring is greater than the second.
Negative if the second substring is greater than the first.

Retrieves number of characters (UTF code points) that this string can hold without reallocation.

This may be the same as or more than Length().

Parameters:
str The string.
Returns:
The number of characters that can be held in this string without reallocation.

Performs a caseless comparison of substrings in two Unicode strings.

Strings are case folded in a locale-independent manner prior to comparison. Uninitialized strings are equal to other uninitialized strings and empty strings, and are less than initialized, non-empty strings. (Note that this function returns a numeric value, not an error code.)

Parameters:
str The first string (left side of compare).
pos The 0-based offset for the first character of the first substring.
num The number of characters in the first substring.
str2 The second string (right side of compare).
startOffset The 0-based offset for the first character of the second substring.
count The number of characters in the second substring.
Returns:
0 if the substrings are equal.
Positive if the first substring is greater than the second.
Negative if the second substring is greater than the first.

Searches for the first occurrence of a substring of one Unicode string within a substring of another Unicode string, performing a caseless comparison.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The maximum number of characters within str2 to search for.
Returns:
The 0-based character index of the found string, or npos if the string is not found.

Clears the contents of a Unicode string.

An uninitialized string remains unchanged. (Note that this function does not return an error code.)

Parameters:
str The string.

Compares substrings in two Unicode strings.

Uninitialized strings are equal to other uninitialized strings and empty strings, and are less than initialized, non-empty strings. (Note that this function returns a numeric value, not an error code.)

Parameters:
str The first string (left side of compare).
pos The 0-based offset for the first character of the first substring.
num The number of characters in the first substring.
str2 The second string (right side of compare).
startOffset The 0-based offset for the first character of the second substring.
count The number of characters in the second substring.
Returns:
0 if the substrings are equal.
Positive if the first substring is greater than the second.
Negative if the second substring is greater than the first.

Copies one Unicode string into another.

Parameters:
str The destination string.
str2 The source string. If empty or uninitialized, the destination string is truncated.

Deletes the contents of a Unicode string, and reset it to an uninitialized state.

Any pointers to UTF-16 buffers derived from that string become invalid.

Parameters:
str The string.

Reports whether a Unicode string is empty.

(Note that this function returns a boolean value, not an error code.)

Parameters:
str The string.
Returns:
True if the string is uninitialized or empty.

Erases characters from a Unicode string.

Parameters:
str The string, which is modified in place.
startOffset The 0-based index of the first character to erase.
count The maximum number of characters to erase.
Returns:
An error if the given position index is not a valid offset into the string.

Searches for the first occurrence of a character in a substring of a Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string.
ch The character to search for.
startOffset The 0-based index in str at which to start the search.
Returns:
The 0-based character index of the found character, or npos if the character is not found.

Searches in a Unicode string for the first occurrence of any character that does not appear in a subset of another string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The number of characters from the start of str2 to compare.
Returns:
The 0-based character index of the found character, or npos if the character is not found.

Searches for the first occurrence of any character from a subset of one Unicode string in a substring of another string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The number of characters from the start of str2 to compare.
Returns:
The 0-based character index of the found character, or npos if the character is not found.

Searches in a Unicode string for the last character that does not appear in a substring of another string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The number of characters from the start of str2 to compare.
Returns:
The 0-based character index of the found character, or npos if the character is not found.

Searches in a Unicode string for the last character that also appears in a substring of another string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The number of characters from the start of str2 to compare.
Returns:
The 0-based character index of the found character, or npos if the character is not found.

Searches for the first occurrence of an entire string within a substring of a Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
Returns:
The 0-based character index of the found string, or npos if the string is not found.

Searches for the first occurrence of a substring of one Unicode string within a substring of another Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The maximum number of characters within str2 to search for.
Returns:
The 0-based character index of the found string, or npos if the string is not found.

Retrieves the contents of a Unicode string in a given encoding.

Parameters:
str The string.
encoding The encoding.
buffer [out] A buffer in which to return the encoded contents. Need not be initialized prior to the call.
bufferByteCount [out] A buffer in which to return the number of bytes in the buffer that contain the requested data. The buffer can be larger than this.

Retrieves the UTF-32 code point at an index position in a Unicode string.

Parameters:
str The string.
position The 0-based character offset for the character.
ch [out] A buffer in which to return the character.
Returns:
An error if the given position is not a valid offset into the string.

Reports whether a Unicode string contains surrogate pairs.

(Note that this function returns a boolean value, not an error code.)

Parameters:
str The string.
Returns:
True if it contains at least one surrogate pair.

Initializes a Unicode string with the contents of a C string.

Parameters:
str [out] A buffer in which to return the Unicode string.
string The C string.
srcByteLen The number of bytes in the C string.
encoding The encoding type for the new string.

Initializes a Unicode string with the contents of a UTF-16 encoded string.

Parameters:
str [out] A buffer in which to return the Unicode string.
utfs The UTF-16 encoded string, an array UTF-16 code units.
srcUTF16Count The number of UTF-16 code units to be taken from the source string. A value of npos mean that the source string is 0-terminated.

Initializes a Unicode string with a single UTF-32 code point (character) repeated a given number of times.

Parameters:
str [out] A buffer in which to return the Unicode string.
count The number of characters.
ch The UTF code point.

Initializes a Unicode string from a ZString.

(ZStrings are used internally for localization.)

Parameters:
str The string.
zStringKey The ZString key.

Retrieves the number of UTF-32 code points (characters) in a Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string.
Returns:
The number of characters, 0 for an uninitialized or empty string.

Normalizes a Unicode string.

Parameters:
str The string.
form The normalization format.

Request to change the capacity of this string to accommodate at least the specified number of characters.

If new capacity is greater than the current Capacity(), new storage is allocated, and Capacity() is made equal or greater than new capacity. If new capacity is less than or equal to the current Capacity(), there is no effect. (Note that this function does not return an error code.)

Parameters:
str The string, which is modified in place.
count The new desired capacity of this string in number of characters.

Resizes a Unicode string to hold a given number of characters, truncating or padding it as needed.

Parameters:
str The string, which is modified in place.
count The number of characters.
ch The padding character, if needed.

Searches for the last occurrence of a character in a substring of a Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string.
ch The character to search for.
startOffset The 0-based index in str at which to start the search.
Returns:
The 0-based character index of the found character, or npos if the character is not found.

Searches for the last occurrence of an entire string within a substring of a Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
Returns:
The 0-based character index of the found string, or npos if the string is not found.

Searches for the last occurrence of a substring of one Unicode string within a substring of another Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string to search in.
str2 The string to compare against.
startOffset The 0-based index in str at which to start the search.
count The maximum number of characters within str2 to search for.
Returns:
The 0-based character index of the found string, or npos if the string is not found.

Creates a substring of a Unicode string.

Parameters:
subString [in, out] A Unicode string in which to return the substring. If it is uninitialized on input, it is initialized only if the source string is initialized and not empty.
str The source string.
offset The 0-based index in str at which to start the substring.
count The maximum number of characters to place in the new substring.

Swaps the contents of two Unicode strings.

Parameters:
str The first string.
str2 The second string.

Convert the characters in this to lower case following the conventions of the default locale.

Parameters:
UnicodeString to modify via reference
Returns:
nothing.

Convert the characters in this to upper case following the conventions of the default locale.

Parameters:
UnicodeString to modify via reference
Returns:
nothing.

Retrieves a read-only pointer to a buffer that contains UTF-16 encoded characters in platform byte order, for a given Unicode string.

(Note that this function returns a numeric value, not an error code.)

Parameters:
str The string.
buffer [out] The pointer to the buffer. Can be 0 if the string is empty or uninitialized. Might not be 0 terminated.
Returns:
The length of the buffer in UTF-16 code units.

The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks