- OpenTofu言語
- 関数
- startswith
startswith
関数
startswith
は2つの値、チェックする文字列とプレフィックス文字列を受け取ります。関数は、文字列がその正確なプレフィックスで始まる場合に true を返します。
startswith(string, prefix)
例
> startswith("hello world", "hello")
true
> startswith("hello world", "world")
false
関連関数
endswith
は2つの値、チェックする文字列とサフィックス文字列を受け取ります。関数は、最初の文字列がその正確なサフィックスで終わる場合に true を返します。