NetLinx UniCode Functions
181
NetLinx Programming Language Reference Guide
NetLinx UniCode Functions (Cont.)
WC_RIGHT_STRING
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'
WC_SET_LENGTH_STRING
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)
WC_TO_CH
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'))
WC_TP_ENCODE
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"
WC_UPPER_STRING
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 PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...