touchgfx::Unicode::strncmp() is only used within TouchGFX.
 
Symbols
loading...
Files
loading...

touchgfx::Unicode::strncmp() method

@fn static int Unicode::strncmp(const UnicodeChar* RESTRICT str1, const UnicodeChar* RESTRICT str2, uint16_t maxchars); Compares up to maxchars characters of the string str1 to those of the string str2. Compares up to maxchars characters of the string str1 to those of the string str2. This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs until the characters differ, until a terminating null-character is reached, or until maxchars characters match in both strings, whichever happens first.

Syntax

static int strncmp(const UnicodeChar* RESTRICT str1,     const UnicodeChar* RESTRICT str2,     uint16_t maxchars);

Arguments

str1

The first string.

str2

The second string.

maxchars

The maximum number of chars to compare.

Return value

Returns an integral value indicating the relationship between the strings: A zero value indicates that the characters compared in both strings are all equal. A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2; And a value less than zero indicates the opposite.

References

LocationText
Unicode.hpp:521
static int strncmp(const UnicodeChar* RESTRICT str1, const UnicodeChar* RESTRICT str2, uint16_t maxchars);