STRING::HAS_PREFIX
1g 2024-12-10 laplante@plcb.ca GOWEB/STRING — Check String Prefixtitle: “STRING::HAS_PREFIX” version: “1.0.0” date: 2024-12-10 author: “laplante@plcb.ca” section: “1g” category: “GOWEB/STRING”
string::has_prefix Check String Prefix
string::has_prefix(string, prefix[, error: variable])
has_prefix(string, prefix[, error: variable])
string::hasPrefix(string, prefix[, error: variable])
hasPrefix(string, prefix[, error: variable])
The has_prefix
function returns a boolean value indicating whether the given string starts with the specified prefix.
res={{
dir := "/extengo/file";
has_prefix(dir, "/extengo");
has_prefix(dir, "extengo");
has_suffix(dir, "le");
has_suffix(dir, "le.");
has_suffix(dir, "");
}}.
Returns:
res=truefalsetruefalsetrue
laplante@plcb.ca