Wc_Right_String; Wc_Set_Length_String; Wc_To_Ch; Wc_Tp_Encode - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

NetLinx UniCode Functions (Cont.)

WC_RIGHT_STRING

WC_SET_LENGTH_STRING

WC_TO_CH

WC_TP_ENCODE

WC_UPPER_STRING

NetLinx Programming Language Reference Guide
Returns the specified number of characters from the end of a string.
WIDECHAR[ ] WC_RIGHT_STRING (WIDECHAR STRING[ ], LONG
Count)
Parameters:
• STRING: The string from which to extract the characters.
• Count: The number of character to copy from the end of the string.
Result:
The return is a string containing a copy of the last Count characters from
STRING.
wcSTRING = _WC('ABCDEFG')wcSubstr =
WC_RIGHT_STRING(wcSTRING, 3) // wcSubstr = 'EFG'
This function sets the length of a WIDECHAR string. This function provides the
same functionality as SET_LENGTH_ARRAY.
LONG WC_SET_LENGTH_STRING (WIDECHAR STRING[ ], LONG Len)
Parameters:
• STRING: The input widechar string.
• Len: The new string length.
WC_SET_LENGTH_STRING(wcSTRING, 10)
This keyword converts a WIDECHAR array to a CHAR array.
CHAR[ ] WC_TO_CH (WIDECHAR wcSTRING[ ])
Parameters:
• STRING: The widechar string to convert to a character string.
Result:
A character string version of the widechar string. All characters that require
more than 8 bits of storage are converted to the '?' character.
cData= WC_TO_CH (_WC('Unicode'))
This function encodes a WIDECHAR array into a CHAR array formatted for the
UNI and BAU user interface commands.
CHAR[ ] WC_TP_ENCODE (WIDECHAR STRING[ ])
Parameters:
• STRING: The widechar string to send to a user interface.
Result:
The result is an encoded character string.
cString = WC_TP_ENCODE(wcSTRING)SEND_COMMAND
dvTY,"'^UNI-1,0,',cString"
This function changes all alphabetic characters in the specified string to upper
case using the case mapping specified by Unicode.org.
WIDECHAR[ ] WC_UPPER_STRING (WIDECHAR wcSTRING[ ])
Parameters:
• STRING: The widechar string to convert to upper case.
Result:
The result is the converted widechar string.
wcUCString = WC_UPPER_STRING(wcSTRING)
NetLinx UniCode Functions
181

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents