dmlfw (Daniyal Machine Learning Framework)

Common string-related utility functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int dmlfw_strcmp_case_insensitive (const char *left, const char *right)
 Compares two strings ignoring case differences.
 
void dmlfw_uint32_to_binary (uint32_t number, char *string)
 Converts a 32-bit unsigned integer to a binary string.
 

Detailed Description

Common string-related utility functions.

Version
1.0
Date
2025-09-25

This header provides essential string operations:

Error Handling:

Functions use the centralized error API to report failures. Use dmlfw_error() after calls to check status, and dmlfw_get_error_string() plus dmlfw_get_debug_string() for diagnostics.

Function Documentation

◆ dmlfw_strcmp_case_insensitive()

int dmlfw_strcmp_case_insensitive ( const char *  left,
const char *  right 
)

Compares two strings ignoring case differences.

Performs a case-insensitive comparison of left and right.

Parameters
left[in] Left string (must not be NULL).
right[in] Right string (must not be NULL).
Returns
0 if strings are equal ignoring case, negative if left < right, positive if left > right.
Examples
example_utils_string.c.

◆ dmlfw_uint32_to_binary()

void dmlfw_uint32_to_binary ( uint32_t  number,
char *  string 
)

Converts a 32-bit unsigned integer to a binary string.

Converts number to a null-terminated string of '0' and '1' characters, representing the binary format from most significant bit to least.

Parameters
number[in] Number to convert.
string[out] Destination buffer to hold binary string. Must be at least 33 bytes in size (32 bits + null).
Examples
example_utils_string.c.