Uses of the Utilities.Trim function

Some tools on the web page I am testing have leading or trailing whitespaces. I am utilizes the Utilities.Trim function to eliminate them, but sometimes this does not work. What is incorrect?

E

Expert

Verified

There are some types of whitespace characters which can be used in HTML pages: “usual” spaces (along with ASCII code 32), end spaces (, code 8194) and non-breaking spaces ( , code 160) and others. For further information on these characters, look at the Whitespace and Formatting Characters article. The function Utilities.Trim is only removes the “usual” spaces by the string. To eliminate other whitespaces, you can utilize the Utilities.StringReplace function to replace them along with empty strings. For illustration, the code snippet below expresses how to remove non-breaking spaces by a string.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.