Files
opentf/website/docs/language/functions/chomp.html.md
Dylan Staley 0e48f58688 Revert "migrate docs to mdx"
This reverts commit 3cb12b5a52.
2021-11-22 15:57:25 -08:00

649 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
language chomp - Functions - Configuration Language docs-funcs-string-chomp The chomp function removes newline characters at the end of a string.

chomp Function

chomp removes newline characters at the end of a string.

This can be useful if, for example, the string was read from a file that has a newline character at the end.

Examples

> chomp("hello\n")
hello
> chomp("hello\r\n")
hello
> chomp("hello\n\n")
hello
  • trimspace, which removes all types of whitespace from both the start and the end of a string.