UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

Prev | Next | String Verbs > string.commentDelete

string.commentDelete

Syntax string.commentDelete (string)

Params string is the string from which you wish to strip the comment.

Action Removes a comment from a string.

Returns string without the characters following the first occurrence of the chevron («) character or the // comment marker.

Examples string.commentDelete ("Rudy Kiesler « famous New Yorker")

   » "Rudy Kiesler "

string.commentDelete ("Rudy Kiesler // famous New Yorker")

   » "Rudy Kiesler "

string.commentDelete ("Rudy Kiesler « famous « in New York")

   » "Rudy Kiesler " // Embedded comment also removed

string.commentDelete ("Rudy Kiesler, famous New Yorker")

   » "Rudy Kiesler, famous New Yorker"

There is no comment in this example, so nothing is removed.

Notes The chevron character is created on Mac OS by pressing Option-backslash.

Note that string.commentDelete finds the first occurrence of the chevron character or // and removes the rest of the line. Embedded comments or multiple comments are therefore also removed. This is standard formatting for a Frontier script but if you use

chevrons for other purposes, you should be aware of its behavior with respect to this verb.

Beware using this verb on URLs, since they contain the // comment marker.

This verb ignores chevrons enclosed in quotation marks.

Prev | Next | String Verbs > string.commentDelete

Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X