ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Character String and Byte String Processing → System Classes for Character String and Byte String Processing
Class for Trailing Blanks
The class CL_ABAP_STRING_UTILITIES contains methods for processing text strings.
- C2STR_PRESERVING_BLANKS assigns text fields while preserving the trailing blanks.
- DEL_TRAILING_BLANKS deletes the trailing blanks from strings.
Other versions: 7.31 | 7.40 | 7.54
Note
Tasks like this can now also be performed using statements and built-in functions.
Example
The program compares the method C2STR_PRESERVING_BLANKS with the built-in function
shift_right
. The implementation of the method now consists of nothing more than this function.
DATA(str) = `abc `.
DATA(rslt) = str.
cl_abap_string_utilities=>del_trailing_blanks( CHANGING str = rslt ).
ASSERT rslt = shift_right( str ).
This translation does not reflect the current version of the documentation.