ZYAN_INLINEZyanU64ZyanAbsI64(ZyanI64x)
Get the absolute value of a 64 bit int.
Parametersx The value to process.
Returns
The absolute, unsigned value.
This gracefully deals with the special case of x being INT_MAX.
ZYCORE_EXPORTZyanStatusZyanStringAppendDecS(ZyanString*string,ZyanI64value,ZyanU8padding_length,ZyanBoolforce_sign,constZyanStringView*prefix)
Formats the given signed ordinal value to its decimal text-representation and appends it to the string.
Parametersstring A pointer to the ZyanString instance.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
force_sign Set ZYAN_TRUE, to force printing of the + sign for positive numbers.
prefix The string to use as prefix or ZYAN_NULL, if not needed.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringAppendDecU(ZyanString*string,ZyanU64value,ZyanU8padding_length)
Formats the given unsigned ordinal value to its decimal text-representation and appends it to the string.
Parametersstring A pointer to the ZyanString instance.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZYAN_REQUIRES_LIBCZyanStatusZyanStringAppendFormat(ZyanString*string,constchar*format,...)
Appends formatted text to the destination string.
Parametersstring The destination string.
format The format string.
... The format arguments.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringAppendHexS(ZyanString*string,ZyanI64value,ZyanU8padding_length,ZyanBooluppercase,ZyanBoolforce_sign,constZyanStringView*prefix)
Formats the given signed ordinal value to its hexadecimal text-representation and appends it to the
string.
Parametersstring A pointer to the ZyanString instance.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
uppercase Set ZYAN_TRUE to use uppercase letters ('A'-'F') instead of lowercase ones ('a'-'f').
force_sign Set ZYAN_TRUE, to force printing of the + sign for positive numbers.
prefix The string to use as prefix or ZYAN_NULL, if not needed.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringAppendHexU(ZyanString*string,ZyanU64value,ZyanU8padding_length,ZyanBooluppercase)
Formats the given unsigned ordinal value to its hexadecimal text-representation and appends it to the
string.
Parametersstring A pointer to the ZyanString instance.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
uppercase Set ZYAN_TRUE to use uppercase letters ('A'-'F') instead of lowercase ones ('a'-'f').
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringInsertDecS(ZyanString*string,ZyanUSizeindex,ZyanI64value,ZyanU8padding_length,ZyanBoolforce_sign,constZyanString*prefix)
Formats the given signed ordinal value to its decimal text-representation and inserts it to the string.
Parametersstring A pointer to the ZyanString instance.
index The insert index.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
force_sign Set ZYAN_TRUE, to force printing of the + sign for positive numbers.
prefix The string to use as prefix or ZYAN_NULL, if not needed.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringInsertDecU(ZyanString*string,ZyanUSizeindex,ZyanU64value,ZyanU8padding_length)
Formats the given unsigned ordinal value to its decimal text-representation and inserts it to the string.
Parametersstring A pointer to the ZyanString instance.
index The insert index.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringInsertFormat(ZyanString*string,ZyanUSizeindex,constchar*format,...)
Inserts formatted text in the destination string at the given index.
Parametersstring The destination string.
index The insert index.
format The format string.
... The format arguments.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringInsertHexS(ZyanString*string,ZyanUSizeindex,ZyanI64value,ZyanU8padding_length,ZyanBooluppercase,ZyanBoolforce_sign,constZyanString*prefix)
Formats the given signed ordinal value to its hexadecimal text-representation and inserts it to the
string.
Parametersstring A pointer to the ZyanString instance.
index The insert index.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
uppercase Set ZYAN_TRUE to use uppercase letters ('A'-'F') instead of lowercase ones ('a'-'f').
force_sign Set ZYAN_TRUE, to force printing of the + sign for positive numbers.
prefix The string to use as prefix or ZYAN_NULL, if not needed.
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.
ZYCORE_EXPORTZyanStatusZyanStringInsertHexU(ZyanString*string,ZyanUSizeindex,ZyanU64value,ZyanU8padding_length,ZyanBooluppercase)
Formats the given unsigned ordinal value to its hexadecimal text-representation and inserts it to the
string.
Parametersstring A pointer to the ZyanString instance.
index The insert index.
value The value.
padding_length Padds the converted value with leading zeros, if the number of chars is less than the
padding_length.
uppercase Set ZYAN_TRUE to use uppercase letters ('A'-'F') instead of lowercase ones ('a'-'f').
Returns
A zyan status code.
This function will fail, if the ZYAN_STRING_IS_IMMUTABLE flag is set for the specified ZyanString
instance.