Unit WAStrUtl |
Renamed from StrUtils.pas 6/14/1998 Paul Rice to avoid conflicts with others' work. +----------------------------------------------------------------------------+ | İ İ | | İİ İ İ İ | | İİİ İ İ İ | | İİ İ İ İ | | İ İİ İ İ | | İ İ İİİ İİ İ | | İİ İ İ İİİİİİİİİİ İ | | İ İİ İİ İİİİİİİİİİİİİİİ | | İ İİİ İİİİİİ İİİ İ İİİİİİİİ | | İ İİ İİİİİİİİİİİİ İ İİİİİİİİİİ Copyright İ 1996-1997 by: | | İ İİİİİİ İİİİİİİİİİİ İ İİİİİ İİ | | İ İİİİİİİ İİİİİ İİİİ İİ İİ İ WHITE ANTS SYSTEMHOUSE BV | | İ İİİİİİİ İİİ İİİ İİ İ İİİİ Geleen 12 | | İ İİİİİİİ İ İİ İİİ İ 8032 GB Zwolle | | İİİİİİ İ İ İ Netherlands | | İİİ İİİİİ İ İİ İ İ | | İİ İ İ İİİ İ Tel. +31 38 453 86 31 | | İ İ İ Fax. +31 38 453 41 22 | | İ İ İİ | | İ İ İİ www.whiteants.com | | İİ İ İ İ support@whiteants.com | | İ | +----------------------------------------------------------------------------+ file : StrUtils version : 1.01 comment : Part of this file was taken form S_STRING.PAS by RAY LISCHNER Book: Secrets of Delphi 2.0 author : G. Beuze, R. Post, L. Laarhoven, R. Lischner compiler : Delphi 1.0, partly Delphi 2.0 +----------------------------------------------------------------------------+ | DISCLAIMER: | | THIS SOURCE IS FREEWARE. YOU ARE ALLOWED TO USE IT IN YOUR OWN PROJECTS | | WITHOUT ANY RESTRICTIONS. YOU ARE NOT ALLOWED TO SELL THE SOURCE CODE. | | THERE IS NO WARRANTY AT ALL - YOU USE IT ON YOUR OWN RISC. WHITE ANTS DOES | | NOT ASSUME ANY RESPONSIBILITY FOR ANY DAMAGE OR ANY LOSS OF TIME OR MONEY | | DUE THE USE OF ANY PART OF THIS SOURCE CODE. | +----------------------------------------------------------------------------+
Classes |
Functions |
AbbrStr - Returns number of leading tabs
BCDtoByte - Returns BCD coded representation of a
BlankString - Returns a string of length (Cnt), filled with C
ByteToBCD - Returns S^ or '' if s = nil
ByteToBinaryStr - Returns Byte value of BCD coded byte a
CharString - Removes any leading and trailing character C from S
DelChars -
DelLeftChars - Removes any characters #0.
DelLeftRightChars - Removes any trailing character C from S
DelRightChars - Removes any leading character C from S
DelWhiteSpace - Removes any character C from S
GetIndex - Returns 'template' as in TEMPLATE0001
GetName - Returns True if a number was found to the right of Str
for example as in 'Button123'.
GetNameAndValue - Returns Value as in: Name=Value , or '' if no = was found
GetTemplate - Converts S to extended, on exception returns DefValue
GetTemplateAndIndex - Returns Index = 1 as in TEMPLATE0001
GetValue - Returns Name as iN: Name=Value , or '' if no = was found
IsPrefix - Returns S in lower case except the first char which is upper:
'example' -> 'Example', 'EXAMPLE' -> 'Example'
LeadBlanksCnt - Returns number of leading chars C
LeadCharsCnt - Returns a string a Cnt blanks
LeadTabCnt - Returns number of leading blanks
LongToBinaryStr - Returns '00011100|00011100' style string,
with | defined by ByteDelimiter const, See NibbleDelimiter
MatchStrings - Returns '00011100|00011100|00011100|00011100' style string, see Delimiters
-------------------------------------------------------------------------}
This function takes two strings and compares them.
MixedCase - Returns a string with length <= MaxLen.
StringValue - Returns True if Str starts with SubStr ignoring case
StrToFloatDef - Returns True if Source matches Pattern '*Example?*' etc } { Orignal code by Sean Stanley in C, Rewritten in Delphi by David Stidolph
StrToPChar - Convert a Pascal string to a PChar.
WordToBinaryStr - Returns '0001.
Types |
Constants |
Variables |
Functions |
-------------------------------------------------------------------------} This function takes two strings and compares them. The first string can be anything, but should not contain pattern characters (* or ?). The pattern string can have as many of these pattern characters as you want. For example: MatchStrings('David Stidolph','*St*') would return True. Orignal code by Sean Stanley in C Rewritten in Delphi by David Stidolph {-------------------------------------------------------------------------
Delphi 2.0 knows how to convert string to PChar.
Types |
Constants |
Variables |