HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Upload a template Create a script

STRIP Function

STRIP function removes a text string you specify from the beginning and/or end of a text value you specify.

TRIM ( TEXT ) is equivalent to STRIP ( TEXT, "\t\", TRUE, TRUE ). See TRIM ( TEXT ) for more information.

By default, Author removes the characters from both the beginning and the end of the text. If you want to specify just one or the other, you must use the TRUE_FALSE parameters.

Character Description
\\ backslash character
\h non-breaking hyphen
\l line break
\p paragraph mark
\s non-breaking space
\t tab

 

Function name  STRIP
Usage model STRIP ( TEXT, Characters: TEXT, at beginning: TRUE_FALSE, at end: TRUE_FALSE )
Parameters This function requires you to replace four parameters:

TEXT

The function searches this string of characters.

characters: TEXT

This parameters refers to the string of characters for which you want the function to search.

at beginning: TRUE_FALSE

If the variable is true, the function strips characters from the beginning of the text.

at end: TRUE_FALSE

If the variable is true, the function strips characters from the end of the text.
Result A text value.

Example

Assume you want to remove punctuation or space characters from the end of an answer (because the punctuation is already included in the document text). The following script enables you to accomplish this:

SET Product Description TO STRIP(Product Description, " !.,?", FALSE, TRUE)

Because the FALSE and TRUE parameters are used, HotDocs strips the characters from the end of the answer (TRUE) and not the beginning (FALSE).