Component.MakeStringSafe

Make strings safe for format string usage by escaping special characters. Ensures text can be safely used within format strings.

Syntax

DaxLib.FormatString.Component.MakeStringSafe ( input_string )

Definition

DAX
// Wraps strings in double-quotes to avoid issues with format string interpretation
(
    // The value you want to put in the format string
    unsafe_string : STRING
)
=>
    """" & unsafe_string & """"

Parameters

Parameter Type Description
input_string STRING String to make safe for format usage

Example

DaxLib.FormatString.Component.MakeStringSafe ( "123 KB" )

Use this function to safely include strings in format strings by escaping special characters.

Related Functions