STRING::TRIMSUFFIX 1g 2024-11-11 laplante@plcb.ca GOWEB/STRING — Remove a Suffix from a String


title: “STRING::TRIMSUFFIX” version: “1.0.0” date: 2024-11-11 author: “laplante@plcb.ca” section: “1g”

category: “GOWEB/STRING”

Name

string::trimSuffix Remove a Suffix from a String

Synopsis

string::trimSuffix(str, suffix[, error: variable])
trimSuffix(str, suffix[, error: variable])

Description

The trimSuffix function returns the given string str without the specified trailing suffix.


Parameters


Examples

res={{
    s := "/a/b/c/IMG.mp4";
    b := base(s);
    trimSuffix(b, extension(s));
}}.

Returns:

IMG

Author

laplante@plcb.ca

See Also


Version