upperCase
Short summary
This method converts the lowercase letters in an 8 bit windows-1252 or windows-1251 string to uppercase letters.
Attention: All strings are handled as null-terminated byte streams.
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringAddress | POINTER TO BYTE | string to ucase | input |
| stringLength | UDINT | length of the string | input |
| sbcsType | Tc2_Utilities.E_SBCSType | used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE | input |
Code
Declaration
METHOD PROTECTED upperCase
VAR_INPUT
(* string to ucase *)
stringAddress :POINTER TO BYTE;
(* length of the string *)
stringLength :UDINT;
(* used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE *)
sbcsType :Tc2_Utilities.E_SBCSType := Tc2_Utilities.E_SBCSType.eSBCS_WesternEuropean;
END_VAR
Implementation
RETURN (stringAddress = 0);
CASE sbcsType OF
Tc2_Utilities.E_SBCSType.eSBCS_WesternEuropean:
upperCase1252(stringAddress, stringLength);
Tc2_Utilities.E_SBCSType.eSBCS_CentralEuropean:
upperCase1251(stringAddress, stringLength);
ELSE
; // do nothing
END_CASE