YouTip LogoYouTip

Func Trim

# VBScript Trim Function * * Complete VBScript Reference Manual](#) * * * The Trim function removes spaces from both ends of a string. **Tip:** See the LTrim and RTrim functions. ### Syntax Trim(string) | Parameter | Description | | :--- | :--- | | string | Required. A string expression. | ## Example ## Example fname=" Jack " document.write("Hello" & Trim(fname) & "and welcome.") Output of the example above: HelloJackand welcome. [Try it yourself Β»](#) * * Complete VBScript Reference Manual](#)
← Func MidFunc Rtrim β†’