NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

StrConv Function

Returns aString converted as specified.

StrConv(string, conversion, LCID)

Arguments

string
Required. String expression to be converted.
conversion
Required. Integer. The sum of values specifying the type of conversion to perform.
LCID
Optional. The LocaleID, if different than the system LocaleID. (The system LocaleID is the default.)

Settings

The conversion argument settings are:

Constant Value Description
UpperCase 1 Converts the string to uppercase characters.
LowerCase 2 Converts the string to lowercase characters.
ProperCase 3 Converts the first letter of every word in string to uppercase.
Wide* 4* Converts narrow (single-byte) characters in string to wide (double-byte) characters.
Narrow* 8* Converts wide (double-byte) characters in string to narrow (single-byte) characters.
Katakana** 16** Converts Hiragana characters in string to Katakana characters.
Hiragana** 32** Converts Katakana characters in string to Hiragana characters.
Unicode 64 Converts the string to Unicode using the default code page of the system.
FromUnicode 128 Converts the string from Unicode to the default code page of the system.

*Applies to Asian locales.

**Applies to Japan only.

Note   These constants are specified in the basic runtime.. As a result, they may be used anywhere in your code in place of the actual values. Most can be combined, for example, UpperCase + Wide, except when they are mutually exclusive, for example, Unicode + FromUnicode. The constants Wide, Narrow, Katakana, and Hiragana cause run-time errors when used in locales where they do not apply.

The following are valid word separators for proper casing: Null (Chr$(0)), horizontal tab (Chr$(9)), linefeed (Chr$(10)), vertical tab (Chr$(11)), form feed (Chr$(12)), carriage return (Chr$(13)), space (SBCS) (Chr$(32)). The actual value for a space varies by country/region for DBCS.

Remarks

When you're converting from a Byte array in ANSI format to a string, you should use the StrConv function. When you're converting from such an array in Unicode format, use an assignment statement.

See Also

Example

Chr Function | String Data Type | Type Conversion Functions