Last time, we looked at 3 functions for formatting the case of text (working with uppercase and lowercase letters, as well as the "Proper" format of first letter capitalized only in a word).
In this article, we’re going to look at a few more tools we have in the "Text and Data" set of functions that can give you increased options in how to validate and transform data in your lists.
The five functions we’ll be looking at are:
*ASC - Converts "full-width" (double-wide) characters into their corresponding "half-wide" (single-byte) equivalents. Useful in language conversions where the typical set of "ASCII" characters are not enough to encompass the (possible) thousands of characters used in the language (also see "Double-Byte Character Sets in Windows"). (Example: full-width text "ファズ・ギター" converts to half-width "ﾌｧｽﾞ･ｷﾞﾀｰ" equivalent - notice the size and spacing of the characters before and after conversion?)
CLEAN - Strips out all non-printable characters from text. Used to format text that may have originated from a separate program or data source that in its output includes low-level code (such as "" blocks) that can’t be printed.
EXACT - Used to compare two strings to see if they are identical. This function uses "case-sensitivity" to determine if the compared values are exactly the same and displays a simple "Yes" or "No" based on the comparison result.
REPT - Used to repeat a character (or characters) a number of times (useful in adding a series of repeated characters to an existing string.
T - Used to get the text of a given value and display it if (and only if) the value is text (will display nothing if the value is a non-text type - i.e. number or Boolean result).
*I wont be covering examples of the "ASC()" function (other than the example given in its definition) since its usage requires a system that can render the "Double-wide" characters (international settings), but suffice it to say that the function can be useful during language conversions to deal with the character sets used.
For the remaining 4 functions, let’s look at some examples of their usage: