QESBPCSConvert Unit Routines |
Description
This is designed to work in Borland Delphi 6 CLX and above, Borland C++ Builder 6 CLX and above, and Borland Kylix 2 and above. Most if not all features will work in Kylix 1 but it is not currently supported.
This unit contains many useful String and conversion routines that are used throughout ESBPCS. Routines use const parameters were possible.
Copyright © 1999-2002 ESB Consultancy
v2.3 - 14 September 2002
Routines |
AlphaCol2Int | Takes a Alphabetic Column Heading like that used in MS Excel and converts it to its Numeric Equivalent. |
Angle2Str | |
AnsiUpCase | Ansi version of the standard UpCase. |
BlankStr | Returns a string composed of blank spaces (ie #32). |
Boolean2Char | Converts a Boolean Value into the corresponding Character. |
Boolean2OnOffStr | Converts a Boolean Value into the corresponding Character. |
Boolean2TF | Converts a Boolean Value into the corresponding Character. |
Boolean2TFStr | Converts a Boolean Value into the corresponding Character. |
Boolean2YB | Converts a Boolean Value into the corresponding Character. |
Boolean2YN | Converts a Boolean Value into the corresponding Character. |
Boolean2YNStr | Converts a Boolean Value into the corresponding Character. |
CentreChStr | Returns a string with specified characters added to the beginning and end of the string to in effect centre the string within the given length. |
CentreStr | Returns a string with blank spaces added to the beginning and end of the string to in effect centre the string within the given length. |
DashStr | Returns a string composed of dashes (minus signs). |
DisplayTabsInString | Returns a String with all occurrences of TAB (ie #9) replaced with the contents of ESBTabStr. |
ESBLastPosCh | Returns the Last Position of given Character, processing from the end of the string. |
ESBPosCh | Returns the first Position of given Character. |
ESBPosNCh | Returns the Position of the n'th occurrence of given Character. |
ESBProperStr | Returns Proper String - each word Capitalized - uses Ansi Capitalisation. |
ExtractValue | Retrieves the P'th Value in a String containing several values separated by given Separator which defaults to a semicolon. |
FillStr | Returns a string filled with the given character. |
Float2CEStr | Converts a Float into a string without Padding and with Thousands Separators. |
Float2CEStr2 | Like Float2CEStr this ccnverts a Float into a string without Padding & with Thousands Separators, except this removes all trailing 0's and the decimal separator if not needed. |
Float2CStr | Converts a Float into a string of length Len with ESBNumPadCh Padding to the Left and with Thousands Separators. |
Float2EStr | Converts a Float into a string without Padding. |
Float2EStr2 | Like Float2EStr this ccnverts a Float into a string without Padding, except this removes all trailing 0's and the decimal separator if not needed. |
Float2Str | Converts a Float into a string of length Len with ESBNumPadCh Padding to the Left. |
Float2ZStr | Converts a Float into a string of length Len with Zero Padding to the Left. |
Hex2Int | Converts a Hexadecimal (string) into an Integer. |
Hex2Int64 | Converts a Hexadecimal (string) into a LongWord. |
Hex2LWord | Converts a Hexadecimal (string) into a LongWord. |
Int2CEStr | Converts an Integer into a string without Padding and with ThousandSeparators as defined in the Regional Settings. |
Int2CStr | Converts an Integer into a string of length Len with ESBNumPadCh Padding and with ThousandSeparators as defined in the Regional Settings. |
Int2EHex | Converts an Integer into a Hexadecimal (string) without Padding. |
Int2EStr | Converts an Integer into a string without Padding. |
Int2Hex | Converts an Integer into a Hexademical (string) of length Len with ESBNumPadCh Padding to the Left. |
Int2Placing | Returns the "Placing" suffix for an integer, ie 1 gives 'st' as in 1st, 12 gives 'th' as in 12th, 22 gives 'nd' as in 22nd, etc. |
Int2Str | Converts an Integer into a string of length Len with ESBNumPadCh Padding to the Left. |
Int2ZHex | Converts an Integer into a string of length Len with Zero Padding to the Left. |
Int2ZStr | Converts an Integer into a string of length Len with Zero Padding to the Left. |
IntCol2Alpha | Takes a Numeric Column Heading and converts it to its Alphabetic Column Heading like that used in Excel. |
IPStr2LWord | Converts a String representing an IP Address 'xxx.xxx.xxx.xxx' into the equivalent LongWord. |
IsAlphaNumericStr | Returns True if the string is not empty and is only made of Standard Alphabetic characters 'A'through 'Z' and 'a' through 'z' or of Digits '0' through '9'. |
IsAlphaStr | Returns True if the string is not empty and is only made of Standard Alphabetic characters 'A'through 'Z' and 'a' through 'z'. |
IsCharSetStr | Returns True if the string is not empty and is only made of Characters in the specificed CharSet. |
IsDigitStr | Returns True if the string is not empty and is only made of Digits '0' through '9'. |
LeftAlignStr | Returns a string of Length N with blank spaces added to the end of the string if S is too short, or returning the N Left-most characters of S if S is too long. |
LeftStr | Returns the substring consisting of the first N characters of S. |
LeftTillChStr | Returns the substring consisting of the characters from S up to but not including the specified one. |
LWord2IPStr | Converts a LongWord representing an IP Address and returns the equivalent string representation 'xxx.xxx.xxx.xxx'. |
PadChLeftStr | Returns a string with the specified character added to the beginning of the string until the string is of the given length. |
PadChRightStr | Returns a string with the specified character added to the beginning of the string until the string is of the given length. |
PadLeftStr | Returns a string with blank spaces added to the beginning of the string until the string is of the given length. |
PadRightStr | Returns a string with blank spaces added to the beginning of the string until the string is of the given length. |
ReplaceChStr | Returns the String with all occurrences of OldCh character replaced with NewCh character. |
RightAfterChStr | Returns the substring consisting of the characters from S after but not including the specified one. |
RightAfterStr | Returns the substring consisting of the remaining characters after the first N Characters of S. |
RightAlignStr | Returns a string of Length N with blank spaces added to the Beginning of the string if S is too short, or returning the N left-most characters of S if S is too long. |
RightStr | Returns the substring consisting of the last N characters of S. |
RightTillChStr | Returns the substring consisting of the right most characters from S up to but not including the specified one. |
SciFloat2EStr | Converts a Float into a string in Scientific Notation without Padding. |
SciFloat2EStr2 | Converts a Float into a string in Scientific Notation without Padding, except this removes all trailing 0's and the decimal separator if not needed. |
SciFloat2Str | Converts a Float into a string in Scientific Notation of length Len with ESBNumPadCh Padding to the Left. |
StarStr | Returns a string composed of stars (asterisks). |
Str2Byte | Converts a string into a Byte. |
Str2Cardinal | Converts a string into a Cardinal. |
Str2Double | Converts a string into a Double. |
Str2Float | Converts a string into an Extended. |
Str2Int | Converts a string into an Integer. |
Str2Int64 | Converts a string into a Int64. |
Str2LInt | Converts a string into a LongInt. |
Str2LWord | Converts a string into a LongWord. |
Str2Single | Converts a string into a Single. |
Str2SInt | Converts a string into a ShortInt. |
Str2SmallInt | Converts a string into a SmallInt. |
Str2Word | Converts a string into a Word. |
StripChFromStr | Returns a String with all occurrences of the given character removed. |
StripChStr | Returns the String with all specified leading & trailing characters removed. |
StripLChStr | Returns the String with all specified leading characters removed. |
StripTChStr | Returns the String with all specified trailing characters removed. |
StripThousandSeparators | Returns a string with all occurrences of the Thousands Separator as defined in the regional settings removed. |
TF2Boolean | Converts a Character Value into its corresponding Boolean value. |
UnderscoreStr | Returns a string composed of Underscores (Shift-Minus). |
ValueMatch | Retrieves True if the specified Value is in a String containing several values separated by given Separator which defaults to a semicolon. |
YN2Boolean | Converts a Character Value into its corresponding Boolean value. |
|