Click or drag to resize

ProperA Function

X#
Capitalize a proper name correctly, changing the contents of the argument as well as the return value.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION ProperA(
	cName REF STRING
) AS STRING
Request Example View Source

Parameters

cName
Type: String
A proper name.

Return Value

Type: String
cName with uppercase letters at the beginning of each word.
Remarks
ProperA() is the same as Proper(), except that ProperA() changes the original string as well.
Tip Tip
You may change more than one variable at the same time (see example below).
Examples
This example uses ProperA() to capitalize a person's name. Compare the results to the results in the Proper example():
X#
1LOCAL cName AS STRING
2cName : = "terry a. brown"
3? ProperA(cName)            // Terry A. Brown
4? cName                        // Terry A. Brown
This example shows how more than one variable may be changed at the same time:
X#
1a:= "i change"
2b:= a
3ProperA(b)
4? b                         // "I Change"
5? a                         // "I Change"
See Also

Reference

ProperA(String)