MidiMountain 0.4.0


Units
Classes, Interfaces and Objects
Types
Variables
Constants
Functions and Procedures
Identifiers

Unit UniStrUtils

Description

Unicode String Utilities
String functions to manipulate WideStrings

Functions and Procedures

Overview

function BreakToWidth( const aWideString: WideString; const aWidth: integer ): WideString;
function CodeBlockFromChar(const C: WideChar): Cardinal;
function StrAllocW(Size: Cardinal): PWideChar;
function StrBufSizeW(Str: PWideChar): Cardinal;
function StrCatW(Dest, Source: PWideChar): PWideChar;
function StrCompW(Str1, Str2: PWideChar): Integer;
function StrCopyW(Dest, Source: PWideChar): PWideChar;
procedure StrDisposeW(Str: PWideChar);
function StrECopyW(Dest, Source: PWideChar): PWideChar;
function StrEndW(Str: PWideChar): PWideChar;
function StrICompW(Str1, Str2: PWideChar): Integer;
function StrLCatW(Dest, Source: PWideChar; MaxLen: Cardinal): PWideChar;
function StrLCompW(Str1, Str2: PWideChar; MaxLen: Cardinal): Integer;
function StrLCopyW(Dest, Source: PWideChar; MaxLen: Cardinal): PWideChar;
function StrLenW(Str: PWideChar): Cardinal;
function StrLICompW(Str1, Str2: PWideChar; MaxLen: Cardinal): Integer;
function StrLowerW(Str: PWideChar): PWideChar;
function StrMoveW(Dest, Source: PWideChar; Count: Cardinal): PWideChar;
function StrNewW(Str: PWideChar): PWideChar;
function StrNScanW(S1, S2: PWideChar): Integer;
function StrPCopyW(Dest: PWideChar; const Source: String): PWideChar;
function StrPLCopyW(Dest: PWideChar; const Source: String; MaxLen: Cardinal): PWideChar;
function StrPosW(Str, SubStr: PWideChar): PWideChar;
function StrRNScanW(S1, S2: PWideChar): Integer;
function StrRScanW(Str: PWideChar; Chr: WideChar): PWideChar;
function StrScanW(Str: PWideChar; Chr: WideChar; StrLen: Cardinal): PWideChar; overload;
function StrScanW(Str: PWideChar; Chr: WideChar): PWideChar; overload;
procedure StrSwapByteOrder(Str: PWideChar);
function StrTitleW(Str: PWideChar): PWideChar;
function StrUpperW(Str: PWideChar): PWideChar;
function UnicodeGetDigit(Code: UCS4): Integer;
function UnicodeGetNumber(Code: UCS4): TUNumber;
function UnicodeIsAlpha(C: UCS4): Boolean;
function UnicodeIsAlphaNum(C: UCS4): Boolean;
function UnicodeIsBlank(C: UCS4): Boolean;
function UnicodeIsClosePunctuation(C: UCS4): Boolean;
function UnicodeIsComposite(C: UCS4): Boolean;
function UnicodeIsConnectionPunctuation(C: UCS4): Boolean;
function UnicodeIsControl(C: UCS4): Boolean;
function UnicodeIsCurrency(C: UCS4): Boolean;
function UnicodeIsDash(C: UCS4): Boolean;
function UnicodeIsDefined(C: UCS4): Boolean;
function UnicodeIsDigit(C: UCS4): Boolean;
function UnicodeIsEnclosing(C: UCS4): Boolean;
function UnicodeIsFinalPunctuation(C: UCS4): Boolean;
function UnicodeIsFormatControl(C: UCS4): Boolean;
function UnicodeIsGraph(C: UCS4): Boolean;
function UnicodeIsHan(C: UCS4): Boolean;
function UnicodeIsHangul(C: UCS4): Boolean;
function UnicodeIsHexDigit(C: UCS4): Boolean;
function UnicodeIsIdenifierStart(C: UCS4): Boolean;
function UnicodeIsIdentifierPart(C: UCS4): Boolean;
function UnicodeIsInitialPunctuation(C: UCS4): Boolean;
function UnicodeIsIsoControl(C: UCS4): Boolean;
function UnicodeIsLetterNumber(C: UCS4): Boolean;
function UnicodeIsLineSeparator(C: UCS4): Boolean;
function UnicodeIsLower(C: UCS4): Boolean;
function UnicodeIsLTR(C: UCS4): Boolean;
function UnicodeIsMark(C: UCS4): Boolean;
function UnicodeIsMath(C: UCS4): Boolean;
function UnicodeIsMirroring(C: UCS4): Boolean;
function UnicodeIsModifier(C: UCS4): Boolean;
function UnicodeIsModifierSymbol(C: UCS4): Boolean;
function UnicodeIsNeutral(C: UCS4): Boolean;
function UnicodeIsNonBreaking(C: UCS4): Boolean;
function UnicodeIsNonSpacing(C: UCS4): Boolean;
function UnicodeIsNonSpacingMark(C: UCS4): Boolean;
function UnicodeIsNumber(C: UCS4): Boolean;
function UnicodeIsOpenPunctuation(C: UCS4): Boolean;
function UnicodeIsParagraphSeparator(C: UCS4): Boolean;
function UnicodeIsPrintable(C: UCS4): Boolean;
function UnicodeIsPrivate(C: UCS4): Boolean;
function UnicodeIsPunctuation(C: UCS4): Boolean;
function UnicodeIsQuotationMark(C: UCS4): Boolean;
function UnicodeIsRTL(C: UCS4): Boolean;
function UnicodeIsSeparator(C: UCS4): Boolean;
function UnicodeIsSpace(C: UCS4): Boolean;
function UnicodeIsSpacingMark(C: UCS4): Boolean;
function UnicodeIsStrong(C: UCS4): Boolean;
function UnicodeIsSurrogate(C: UCS4): Boolean;
function UnicodeIsSymbol(C: UCS4): Boolean;
function UnicodeIsSymmetric(C: UCS4): Boolean;
function UnicodeIsTitle(C: UCS4): Boolean;
function UnicodeIsUndefined(C: UCS4): Boolean;
function UnicodeIsUpper(C: UCS4): Boolean;
function UnicodeIsWeak(C: UCS4): Boolean;
function UnicodeIsWhiteSpace(C: UCS4): Boolean;
function UnicodeToLower(Code: UCS4): UCS4;
function UnicodeToTitle(Code: UCS4): UCS4;
function UnicodeToUpper(Code: UCS4): UCS4;
function UTF8ToWideString(S: AnsiString): WideString;
function WideAdjustLineBreaks(const S: WideString): WideString;
function WideCharPos(const S: WideString; const Ch: WideChar; const Index: Integer): Integer;
function WideCompose(const S: WideString): WideString;
function WideComposeHangul(Source: WideString): WideString;
function WideCopy( const aStr: WideString; aFrom, aCount: cardinal ): WideString;
function WideDecompose(const S: WideString): WideString;
function WideExtractQuotedStr(var Src: PWideChar; Quote: WideChar): WideString;
function WideLastChar( const aStr: WideString ): WideChar;
function WideLength( const aStr: WideString ): cardinal;
function WideLoCase(C: WideChar): WideChar;
function WideLowerCase(const S: WideString): WideString;
function WidePos( const aChar: WideChar; const aStr: WideString ): cardinal;
function WideQuotedStr(const S: WideString; Quote: WideChar): WideString;
function WideStringOfChar(C: WideChar; Count: Cardinal): WideString;
function WideStringToUTF8(S: WideString): AnsiString;
function WideTitleCaseChar(C: WideChar): WideChar;
function WideTitleCaseString(const S: WideString): WideString;
function WideTrim(const S: WideString): WideString;
function WideTrimLeft(const S: WideString): WideString;
function WideTrimRight(const S: WideString): WideString;
function WideUpCase(C: WideChar): WideChar;
function WideUpperCase(const S: WideString): WideString;

Description

function BreakToWidth( const aWideString: WideString; const aWidth: integer ): WideString;

break a string at a preferred position into lines

function CodeBlockFromChar(const C: WideChar): Cardinal;

function CodePageFromLocale(Language: LCID): Integer;

function StrAllocW(Size: Cardinal): PWideChar;

Allocates a buffer for a null-terminated wide string and returns a pointer to the first character of the string.

function StrBufSizeW(Str: PWideChar): Cardinal;

Returns max number of wide characters that can be stored in a buffer allocated by StrAllocW.

function StrCatW(Dest, Source: PWideChar): PWideChar;

appends a copy of Source to the end of Dest and returns the concatenated string

function StrCompW(Str1, Str2: PWideChar): Integer;

compares Str1 to Str2 (binary comparation)

function StrCopyW(Dest, Source: PWideChar): PWideChar;

copies Source to Dest and returns Dest

procedure StrDisposeW(Str: PWideChar);

releases a string allocated with StrNew.

function StrECopyW(Dest, Source: PWideChar): PWideChar;

copies Source to Dest and returns a pointer to the null character ending the string

function StrEndW(Str: PWideChar): PWideChar;

returns a pointer to the end of a null terminated string

function StrICompW(Str1, Str2: PWideChar): Integer;

compares Str1 to Str2 without case sensitivity (binary comparation)

function StrLCatW(Dest, Source: PWideChar; MaxLen: Cardinal): PWideChar;

appends a specified maximum number of WideCharacters to string

function StrLCompW(Str1, Str2: PWideChar; MaxLen: Cardinal): Integer;

compares a specified maximum number of charaters in two strings

function StrLCopyW(Dest, Source: PWideChar; MaxLen: Cardinal): PWideChar;

copies a specified maximum number of characters from Source to Dest

function StrLenW(Str: PWideChar): Cardinal;

returns number of characters in a string excluding the null terminator

function StrLICompW(Str1, Str2: PWideChar; MaxLen: Cardinal): Integer;

compares strings up to a specified maximum number of characters, not case sensitive

function StrLowerW(Str: PWideChar): PWideChar;

converts Str to lower case and returns it

function StrMoveW(Dest, Source: PWideChar; Count: Cardinal): PWideChar;

Copies the specified number of characters to the destination string and returns Dest also as result. Dest must have enough room to store at least Count characters.

function StrNewW(Str: PWideChar): PWideChar;

Duplicates the given string (if not nil) and returns the address of the new string.

function StrNScanW(S1, S2: PWideChar): Integer;

determines where (in S1) the first time one of the characters of S2 appear. The result is the length of a string part of S1 where none of the characters of S2 do appear (not counting the trailing #0 and starting with position 0 in S1).

function StrPCopyW(Dest: PWideChar; const Source: String): PWideChar;

copies a Pascal-style string to a null-terminated wide string

function StrPLCopyW(Dest: PWideChar; const Source: String; MaxLen: Cardinal): PWideChar;

copies characters from a Pascal-style string into a null-terminated wide string

function StrPosW(Str, SubStr: PWideChar): PWideChar;

returns a pointer to the first occurance of SubStr in Str

function StrRNScanW(S1, S2: PWideChar): Integer;

This function does the same as StrRNScanW but uses S1 in reverse order. This means S1 points to the last character of a string, is traveresed reversely and terminates with a starting #0. This is useful for parsing strings stored in reversed macro buffers etc.

function StrRScanW(Str: PWideChar; Chr: WideChar): PWideChar;

returns a pointer to the last occurance of Chr in Str

function StrScanW(Str: PWideChar; Chr: WideChar; StrLen: Cardinal): PWideChar; overload;

returns a pointer to first occurrence of a specified character in a string or nil if not found

function StrScanW(Str: PWideChar; Chr: WideChar): PWideChar; overload;

returns a pointer to first occurrence of a specified character in a string

procedure StrSwapByteOrder(Str: PWideChar);

exchanges in each character of the given string the low order and high order byte to go from LSB to MSB and vice versa. EAX contains address of string

function StrTitleW(Str: PWideChar): PWideChar;

converts Str to title case and returns it

function StrUpperW(Str: PWideChar): PWideChar;

converts Str to upper case and returns it

function UnicodeGetDigit(Code: UCS4): Integer;

low level character routines

function UnicodeGetNumber(Code: UCS4): TUNumber;

 

function UnicodeIsAlpha(C: UCS4): Boolean;

character test routines

function UnicodeIsAlphaNum(C: UCS4): Boolean;

 

function UnicodeIsBlank(C: UCS4): Boolean;

 

function UnicodeIsClosePunctuation(C: UCS4): Boolean;

 

function UnicodeIsComposite(C: UCS4): Boolean;

 

function UnicodeIsConnectionPunctuation(C: UCS4): Boolean;

 

function UnicodeIsControl(C: UCS4): Boolean;

 

function UnicodeIsCurrency(C: UCS4): Boolean;

 

function UnicodeIsDash(C: UCS4): Boolean;

 

function UnicodeIsDefined(C: UCS4): Boolean;

 

function UnicodeIsDigit(C: UCS4): Boolean;

 

function UnicodeIsEnclosing(C: UCS4): Boolean;

 

function UnicodeIsFinalPunctuation(C: UCS4): Boolean;

 

function UnicodeIsFormatControl(C: UCS4): Boolean;

 

function UnicodeIsGraph(C: UCS4): Boolean;

 

function UnicodeIsHan(C: UCS4): Boolean;

 

function UnicodeIsHangul(C: UCS4): Boolean;

 

function UnicodeIsHexDigit(C: UCS4): Boolean;

 

function UnicodeIsIdenifierStart(C: UCS4): Boolean;

 

function UnicodeIsIdentifierPart(C: UCS4): Boolean;

 

function UnicodeIsInitialPunctuation(C: UCS4): Boolean;

 

function UnicodeIsIsoControl(C: UCS4): Boolean;

 

function UnicodeIsLetterNumber(C: UCS4): Boolean;

 

function UnicodeIsLineSeparator(C: UCS4): Boolean;

 

function UnicodeIsLower(C: UCS4): Boolean;

 

function UnicodeIsLTR(C: UCS4): Boolean;

 

function UnicodeIsMark(C: UCS4): Boolean;

Other character test functions

function UnicodeIsMath(C: UCS4): Boolean;

 

function UnicodeIsMirroring(C: UCS4): Boolean;

 

function UnicodeIsModifier(C: UCS4): Boolean;

 

function UnicodeIsModifierSymbol(C: UCS4): Boolean;

 

function UnicodeIsNeutral(C: UCS4): Boolean;

 

function UnicodeIsNonBreaking(C: UCS4): Boolean;

 

function UnicodeIsNonSpacing(C: UCS4): Boolean;

 

function UnicodeIsNonSpacingMark(C: UCS4): Boolean;

 

function UnicodeIsNumber(C: UCS4): Boolean;

 

function UnicodeIsOpenPunctuation(C: UCS4): Boolean;

 

function UnicodeIsParagraphSeparator(C: UCS4): Boolean;

 

function UnicodeIsPrintable(C: UCS4): Boolean;

 

function UnicodeIsPrivate(C: UCS4): Boolean;

 

function UnicodeIsPunctuation(C: UCS4): Boolean;

 

function UnicodeIsQuotationMark(C: UCS4): Boolean;

 

function UnicodeIsRTL(C: UCS4): Boolean;

Directionality functions

function UnicodeIsSeparator(C: UCS4): Boolean;

 

function UnicodeIsSpace(C: UCS4): Boolean;

 

function UnicodeIsSpacingMark(C: UCS4): Boolean;

 

function UnicodeIsStrong(C: UCS4): Boolean;

 

function UnicodeIsSurrogate(C: UCS4): Boolean;

 

function UnicodeIsSymbol(C: UCS4): Boolean;

 

function UnicodeIsSymmetric(C: UCS4): Boolean;

 

function UnicodeIsTitle(C: UCS4): Boolean;

 

function UnicodeIsUndefined(C: UCS4): Boolean;

 

function UnicodeIsUpper(C: UCS4): Boolean;

 

function UnicodeIsWeak(C: UCS4): Boolean;

 

function UnicodeIsWhiteSpace(C: UCS4): Boolean;

 

function UnicodeToLower(Code: UCS4): UCS4;

 

function UnicodeToTitle(Code: UCS4): UCS4;

 

function UnicodeToUpper(Code: UCS4): UCS4;

 

function UTF8ToWideString(S: AnsiString): WideString;

 

function WideAdjustLineBreaks(const S: WideString): WideString;

 

function WideCharPos(const S: WideString; const Ch: WideChar; const Index: Integer): Integer;

 

function WideCompose(const S: WideString): WideString;

az

function WideComposeHangul(Source: WideString): WideString;

 

function WideCopy( const aStr: WideString; aFrom, aCount: cardinal ): WideString;

 

function WideDecompose(const S: WideString): WideString;

 

function WideExtractQuotedStr(var Src: PWideChar; Quote: WideChar): WideString;

 

function WideLastChar( const aStr: WideString ): WideChar;

 

function WideLength( const aStr: WideString ): cardinal;

functions involving Delphi wide strings

function WideLoCase(C: WideChar): WideChar;

 

function WideLowerCase(const S: WideString): WideString;

 

function WidePos( const aChar: WideChar; const aStr: WideString ): cardinal;

 

function WideQuotedStr(const S: WideString; Quote: WideChar): WideString;

 

function WideStringOfChar(C: WideChar; Count: Cardinal): WideString;

 

function WideStringToUTF8(S: WideString): AnsiString;

WideString Conversion routines

function WideTitleCaseChar(C: WideChar): WideChar;

 

function WideTitleCaseString(const S: WideString): WideString;

 

function WideTrim(const S: WideString): WideString;

 

function WideTrimLeft(const S: WideString): WideString;

 

function WideTrimRight(const S: WideString): WideString;

 

function WideUpCase(C: WideChar): WideChar;

 

function WideUpperCase(const S: WideString): WideString;

 

Types

NameDescription
PUCS2  
PUCS4 UTF conversion schemes (UCS) data types
TUNumber result type for number retrival functions
UCS2  
UCS4  
UTF16  
UTF32  
UTF7 Unicode transformation formats (UTF) data types
UTF8  

Constants

NameDescription
BOM_LSB_FIRST  
BOM_MSB_FIRST  
CarriageReturn  
CR  
CRLF  
FormFeed  
LF  
LineFeed  
LineSeparator  
ParagraphSeparator  
Space  
Tabulator  
VerticalTab  
WideNull  

MidiMountain 0.4.0 ©1999-2002 Adrian Meyer, developed with Delphi and Kylix


Generated by DIPasDoc 0.8.0 on Wed 29 Oct 2003 21:59:09