Text and Data Manipulation
SenseTalk has strong text handling capabilities. Its chunk expressions, described in Chunk Expressions, provide a powerful and intuitive means of accessing and manipulating specific portions of a text string. In addition, there are a number of commands and functions for obtaining information about text, converting between text and other data formats, and manipulating text at a high level. The commands and functions for performing these actions are described in detail below.
Capitalized
Function
Behavior: The capitalized
function returns text with the first letter of each word capitalized.
Syntax:
{the} capitalized of stringFactor
capitalized( stringExpr )
Example:
put capitalized of "now and then" --> "Now And Then"
Related:
CharToNum
Function
Behavior: Returns the numeric code (in Unicode) representing the first character of its parameter.
Syntax:
{the} charToNum of textFactor
charToNum( textExpr )
Example:
put charToNum("a") --> 97
Related:
Delete
Command
Behavior: The delete
command deletes a chunk of text or one or more occurrences of a target text string within a container. In its simplest form, it will delete every occurrence of the target text, regardless of case. Other forms allow you to specify a chunk by its location, or to tell how many occurrences of a target string—or even to indicate a particular occurrence—to delete, and to specify exact case matching.