Fnd_Text
15 shared methods.
- Fnd_Text_Base64ToText
- Fnd_Text_Capitalize
- Fnd_Text_CapitalizeExclude
- Fnd_Text_DecodeBase64Blob
- Fnd_Text_EncodeBase64Blob
- Fnd_Text_EqualStrings
- Fnd_Text_FormatNumber
- Fnd_Text_Info
- Fnd_Text_MD5Encoding
- Fnd_Text_PadSpaces
- Fnd_Text_StripSpaces
- Fnd_Text_TextToBase64
- Fnd_Text_TextToMD5
- Fnd_Text_Trim
- Fnd_Text_Wrap
Fnd_Text_Base64ToText
Fnd_Text_Base64ToText (text) --> Text
Converts the Base64 encoded text back to ASCII text.
| Parameter | Type | Direction | Description |
|---|---|---|---|
textToDecode | Text | in | The text to decode |
Result | Text | out | The decoded text |
Fnd_Text_Capitalize
Fnd_Text_Capitalize (text{; style}) --> Text
Modifies the capitalization of the text value. The options paramter determines how the text will be modified. If no second parameter is passed, Book Title capitalization is applied.
| Parameter | Type | Direction | Description |
|---|---|---|---|
theText | Text | in | The text to format |
options | Longint | in | Style (optional) |
Result | Text | out | The formatted text |
Fnd_Text_CapitalizeExclude
Fnd_Text_CapitalizeExclude (->exclude array)
Use this method to specify or determine the words that will not be capitalized using the Fnd_Text_Capitalize method.
To get a list of words that will be excluded from capitalization, pass an empty text array.
To set the words to exclude from the capitalization routine, pass an array with at least one element.
To clear the list of words to exclude from the capitalization routines, pass an array with one element consisting of a blank string.
| Parameter | Type | Direction | Description |
|---|---|---|---|
excludeWordsArray | Pointer | in | Text array of words to exclude |
Fnd_Text_DecodeBase64Blob
Fnd_Text_DecodeBase64Blob (->blob)
Converts the blob from Base64 back to the bytes it encodes.
Whitespace inside the encoded text is ignored, so text produced by Fnd_Text_EncodeBase64Blob decodes whatever line breaks it was wrapped with.
| Parameter | Type | Direction | Description |
|---|---|---|---|
pPassedBlob | Pointer | in | A pointer to a blob |
Fnd_Text_EncodeBase64Blob
Fnd_Text_EncodeBase64Blob (->blob{; line breaks?{; line break character(s)}})
Converts the blob to Base64, in place.
Line breaks are inserted after every 76 characters unless the second parameter says otherwise.
| Parameter | Type | Direction | Description |
|---|---|---|---|
pPassedBlob | Pointer | in | A pointer to the blob to encode |
inBInsertLineBr | Boolean | in | Insert line breaks every 76 characters (optional, default True) |
inEOL | Text | in | The line break characters (optional, default a carriage return) |
Fnd_Text_EqualStrings
Fnd_Text_EqualStrings (String1; String2) --> Boolean
Compares two strings in the most efficient manner
| Parameter | Type | Direction | Description |
|---|---|---|---|
stringOne | Text | in | String1 |
stringTwo | Text | in | String2 |
Result | Boolean | out | True if the strings are identical |
Fnd_Text_FormatNumber
Fnd_Text_FormatNumber (string, format) --> Text
Formats a numeric string (like a zip code or phone number). Removes any dashes, "E"s, periods, etc. before formatting.
| Parameter | Type | Direction | Description |
|---|---|---|---|
theNumberToFormat | Text | in | The number as text |
theFormatToUse | Text | in | The format to use |
Result | Text | out | The formatted number |
Fnd_Text_Info
Fnd_Text_Info (label) --> Text
Returns requested information. See the Fnd_Gen_ComponentInfo method for more information.
| Parameter | Type | Direction | Description |
|---|---|---|---|
request | Text | in | Info desired ("version" or "name") |
Result | Text | out | Response |
Fnd_Text_MD5Encoding
Fnd_Text_MD5Encoding ({charset}) --> Text
Sets the charset Fnd_Text_TextToMD5 converts text through before hashing it, for every subsequent call that does not name one itself.
Returns the charset currently in force.
The default is "ISO-8859-1". Call this once at startup to change it:
Fnd_Text_MD5Encoding("UTF-8")
ASCII hashes the same under either, so this only affects text carrying characters above 127. Changing it invalidates any stored digest of such text.
The setting is shared, so it applies to every process in the host.
| Parameter | Type | Direction | Description |
|---|---|---|---|
inCharset | Text | in | The charset name, as CONVERT FROM TEXT understands it (optional) |
Result | Text | out | The charset now in force |
Fnd_Text_PadSpaces
Fnd_Text_PadSpaces (text; length)
Pads the passed text with spaces. If the length of the text is greater than the length paramter, it will be truncated.
| Parameter | Type | Direction | Description |
|---|---|---|---|
inText | Text | in | The text to pad |
length | Longint | in | The desired length |
Result | Text | out | The modified text |
Fnd_Text_StripSpaces
Fnd_Text_StripSpaces (text{; options{; altSpaces}}) --> Text
Strips spaces from the text that is passed to it.
If no second parameter is passed, leading and trailing spaces are stripped from the text.
Add these values together to specify which spaces to strip: 1 + 2 = 3 to strip leading and trailing spaces 1 + 4 = 5 to strip leading and double spaces etc.
A third optional parameter allows you to specify alternatives or multiples: " " - normal behaviour char(9) - strip tabs " "+char(9) - strip spaces and tabs " "+char(9)+char(160) - and non-breaking spaces Leading and trailing runs may mix the characters in any order.
Matching is strict, so a character is stripped only if it is listed..
| Parameter | Type | Direction | Description |
|---|---|---|---|
inTheText | Text | in | The text from which to strip spaces |
inOptions | Longint | in | Options (optional) |
inAltSpaces | Text | in | Alternatives to spaces (optional) |
Result | Text | out | The text with spaces stripped |
Fnd_Text_TextToBase64
Fnd_Text_TextToBase64 (text) --> Text
Converts the text to Base64.
| Parameter | Type | Direction | Description |
|---|---|---|---|
textToEncode | Text | in | The text to encode |
Result | Text | out | The encoded text |
Fnd_Text_TextToMD5
Fnd_Text_TextToMD5 (text{; charset}) --> Text
Generates and returns a MD5 message digest based on the text.
The default charset is ISO-8859-1. Pass a charset name to hash through a different one, or call Fnd_Text_MD5Encoding once to change the default for every subsequent call.
Fnd_Text_TextToMD5("abc") --> 900150983cd24fb0d6963f7d28e17f72
Fnd_Text_TextToMD5($text; "UTF-8") --> hashed as UTF-8 instead
Fnd_Text_MD5Encoding("UTF-8") --> every later call uses UTF-8
| Parameter | Type | Direction | Description |
|---|---|---|---|
textToMD5Digest | Text | in | The text from which to create the message digest |
inCharset | Text | in | Charset to convert the text through (optional) |
Result | Text | out | The message digest |
Fnd_Text_Trim
Fnd_Text_Trim (text) --> Text
Strips native Trim whitespace from both ends of text: space, tab, LF, CR, vertical tab and form feed. Non-breaking space is deliberately excluded.
| Parameter | Type | Direction | Description |
|---|---|---|---|
inTheText | Text | in | The text to trim |
Result | Text | out | The trimmed text |
Fnd_Text_Wrap
Fnd_Text_Wrap (text; max line length) --> Text
Wraps the text into lines of at most the given length, joined by carriage returns. The length is a character count, not a pixel width.
Lines break at the last space that fits. A run with no space in it breaks hard at the limit, and a carriage return already in the text ends its line where it stands.
| Parameter | Type | Direction | Description |
|---|---|---|---|
inRemainingText | Text | in | The text to wrap |
lineLength | Longint | in | Max line length of wrapped text |
Result | Text | out | The wrapped text Routine by Marco Bernasconi <mbernasconi@befund.com> |