cmakepp_lang/utilities/decode_special_chars

cmakepp_lang/utilities/decode_special_chars.cpp_decode_special_chars(argn return_argn)

Decodes special characters to protect them during function passes.

This function decodes special characters that need to be escaped in a CMake string to protect them while being passed as function parameters through multiple functions. It is assumed that this will be called on the arguments immediately before the function is finalized and written to a file.

The special characters handled are $;"\\. For more information about why this is necessary, see documentation for cpp_encode_special_chars.

Parameters:
  • argn (list) – The argument list. This should have at least one string in it, otherwise this function will have nothing to encode.

  • return_argn (list) – Return variable for the encoded argument list.

Returns:

The list of arguments with special characters encoded.

Return type:

list

Example Usage

See documentation for cpp_encode_special_chars for usage of both the encoding and decoding functions.