stringformat
Format the variable according to the arg, a string formatting specifier.
This specifier uses Python string formatting syntax, with the exception that the leading "%" is dropped.
See https://docs.python.org/library/stdtypes.html#printf-style-string-formatting for documentation of Python string formatting.
def stringformat(
value: any,
arg: string
) - > string
Format the variable according to the arg, a string formatting specifier. This specifier uses Python string formatting syntax, with the exception that the leading "%" is dropped.
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | The variable to be formatted; if a tuple is provided, it is converted to its string representation before formatting. |
| arg | string | The Python printf-style formatting specifier (excluding the leading percent sign) used to format the value. |
Returns
| Type | Description |
|---|---|
string | The formatted string resulting from the printf-style operation, or an empty string if formatting fails due to type or value errors. |