RosettaCodeData/Task/Strip-comments-from-a-string/Red/strip-comments-from-a-strin...

11 lines
182 B
Plaintext

s: "apples, pears ; and bananas"
dlms: charset "#;"
trim head clear find s dlms
== "apples, pears"
s: "apples, pears # and bananas"
trim head clear find s dlms
== "apples, pears"