nerdexam
HashiCorp

TA-002-P · Question #195

Which of the following are string functions? Select three

The correct answer is C. Chomp D. format E. join. Terraform's built-in functions are grouped by category. String functions include: chomp (C) - removes trailing newline characters from a string; format (D) - produces a formatted string using printf-style directives; join (E) - concatenates list elements into a single string with

Read, generate, and modify configuration

Question

Which of the following are string functions? Select three

Options

  • Atostring
  • Btonumber
  • CChomp
  • Dformat
  • Ejoin

How the community answered

(18 responses)
  • B
    6% (1)
  • C
    94% (17)

Explanation

Terraform's built-in functions are grouped by category. String functions include: chomp (C) - removes trailing newline characters from a string; format (D) - produces a formatted string using printf-style directives; join (E) - concatenates list elements into a single string with a given delimiter. tostring (A) and tonumber (B) are Type Conversion functions, not string functions - they convert values between types. Knowing function categories is important for the Terraform Associate exam.

Topics

#HCL functions#String functions#Built-in functions#Configuration language

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice