endsWith
Short summary
This assertion method checks if the current string stringToCheck ends with the string end.
Processed strings must be in UTF-8 encoding
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | Tc2_System.T_MaxString | current string to check | input |
| end | Tc2_System.T_MaxString | expected end of stringToCheck | input |
| message | AssertMessage | message if the assertion is false | input |
| sbcsType | Tc2_Utilities.E_SBCSType | used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE | input |
| ignoreCases | BOOL | TRUE means ignore cases; FALSE means that cases must be equal too | input |
| trim | BOOL | TRUE means truncation of spaces on the right side of stringToCheck | input |
Code
Declaration
METHOD endsWith
VAR_INPUT
(* current string to check *)
stringToCheck :Tc2_System.T_MaxString;
(* expected end of ``stringToCheck`` *)
end :Tc2_System.T_MaxString;
(* message if the assertion is false *)
message :AssertMessage;
(* 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;
(* ``TRUE`` means ignore cases; ``FALSE`` means that cases must be equal too *)
ignoreCases :BOOL := FALSE;
(* ``TRUE`` means truncation of spaces on the right side of ``stringToCheck``*)
trim :BOOL := FALSE;
END_VAR
Implementation
assertion.endsWith(
stringToCheck := ADR(stringToCheck),
end := ADR(end),
ignoreCases := ignoreCases,
trim := trim,
message := message,
sbcsType := sbcsType
);