This should do it:
stringvar output := {TABLE_NAME.FIELD_NAME}; output := Trim(output); //get rid of leading & trailing spaces output := Replace(output,Chr(13),''); //get rid of line feed character output := Replace(output,Chr(10),''); //get rid of carriage return character //add any other special characters you want to strip out.
If you have many characters that can be crossed out, you can use this slightly more convenient approach. Just add all the characters you want to cut to []:
stringvar input := {DROPME.TEST_FIELD}; stringvar output := ''; numbervar i; input := Trim(input); for i := 1 to Length(input) Step 1 do if not(input[i] in [Chr(13),Chr(10)]) then output := output + input[i]; output
JosephStyons
source share