Capitalize

Syntax

resultString := Capitalize("string" [, 1])

Description

Capitalize returns the string that results from capitalizing the first character of every word in string. Authorware recognizes a new word when it finds one or more spaces between characters. To capitalize only the first word in string, insert 1 as the optional argument.

Example

In this example, Authorware capitalizes each word stored in the system variable EntryText and places the result in the custom variable Name:

Name := Capitalize(EntryText)

"the rain in spain" becomes "The Rain In Spain"

Name := Capitalize(EntryText, 1)

"the rain in spain" becomes "The rain in spain"