Click or drag to resize

dress Function

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
dress Function

The dress function formats a string for display by converting all characters in the given string to lowercase, except for the first character of each word which is converted to uppercase.

Note Note

The dress function considers words to be strings separated by whitespace.

Note the following exceptions to this behavior:

Roman numerals will retain the capitalization with which they are imported. For the purposes of the dress function, a Roman numeral is any word consisting solely of the letters 'i', 'v', 'x' and 'l'.

Words for which Alchemy should preserve case can be specified within the script using the following syntax:

SET PRESERVE CASE '[' <string> {, <string>} ']' ;

For example, to preserve the case of direction abbreviations, the following could be used:

Alchemy
SET PRESERVE CASE [ "NW", "NE", "SW", "SE" ];

This line prevents the uppercase 'NW', 'NE', 'SW' and 'SE' being case-formatted to 'Nw', 'Ne', 'Sw' and 'Se'. PRESERVE CASE will match strings regardless of their case and leave them unaltered.

Syntax

Alchemy
dress(str);

Nomenclature

strThe string to format for display

Example

The following simple code snippet demonstrates the effect of the dress function:

PRINT dress("tElOGis GeoBase");

Output:

Telogis Geobase

The dress function is commonly used when importing data (using the IMPORT statement) to ensure that names are formatted in a manner suitable for display:

Alchemy
IMPORT POLYGONS [
  ...
  label = dress(%polygon_nm), 
  ...
]