String function mappings

The following table provides a mapping between these two types of functions:

C string function CommonPoint equivalent
strcpy strncpy TText::Extract This function extracts the text range you specify.
strcat strncat TText::Insert This function inserts the range you specify. If you do not specify an insertion point, it appends the string to the end of the text instance.
strcmp strncmp TTextOrder::TextIsEqual or TTextOrder::Compare TextIsEqual returns a Boolean value; Compare returns an enumerated value identifying whether the source string is greater than, equal to, or less than the target string.
strchr TTextPatternIterator::First
strrchr TTextPatternIterator::Last
strspn Use TSpanTextPatternIterator::First to locate the prefix, then call TTextRange::GetLength on the returned range to get the length of the prefix. Your TSpanTextPatternIterator instance must be set to kInclusive. You should verify that the located span does prefix the string.
strcspn Use TSpanTextPatternIterator::First to locate the prefix, then call TTextRange::GetLength on the returned range to get the length of the prefix. Your TSpanTextPatternIterator instance must be set to kExclusive. You should verify that the located span does prefix the string.
strpbrk TSpanTextPatternIterator::First Your TSpanTextPatternIterator instance must be set to kInclusive.
strstr TTextPatternIterator::First
strlen TText::GetLength
strtok Iterate using TSpanTextPatternIterator member functions First and Next. Use the space character as your delimiter and set your TSpanTextPatternIterator instance to kExclusive.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker