- OpenTofu 语言
- 函数
- trimsuffix
trimsuffix
函数
trimsuffix
从给定字符串的末尾移除指定的字尾。
示例
> trimsuffix("helloworld", "world")
hello
相关函数
trim
移除字符串开头和结尾的字符。trimprefix
从字符串开头移除一个单词。trimspace
从字符串开头和结尾移除所有类型的空白字符。
trimsuffix
函数trimsuffix
从给定字符串的末尾移除指定的字尾。
> trimsuffix("helloworld", "world")
hello
trim
移除字符串开头和结尾的字符。trimprefix
从字符串开头移除一个单词。trimspace
从字符串开头和结尾移除所有类型的空白字符。