跳到正文
本页尚未翻译成中文,以下为英文原文。 查看英文版

startswith Function ​

startswith takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.

hcl
startswith(string, prefix)

Examples ​

> startswith("hello world", "hello")
true
> startswith("hello world", "world")
false
  • endswith takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.

基于 MPL-2.0 许可证发布。