Xil_SStrCmp - Xil_SStrCmp - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

This function compares two strings. It also takes maximum string size that Src1 and Src2 can hold to make sure not to read out of bound data for comparison.

Compares source string with destination string with constant time

Prototype

s32 Xil_SStrCmp(const u8 *Str1, const u32 Str1Size, const u8 *Str2, const u32 Str2Size);

Parameters

The following table lists the Xil_SStrCmp function arguments.

Table 1. Xil_SStrCmp Arguments
Type Member Description
const u8 * Str1 - Pointer to first string
const u32 Str1Size - Maximum string size that Str1 can hold
const u8 * Str2 - Pointer to second string
const u32 Str2Size - Maximum string size that Str2 can hold

Returns

XST_SUCCESS - If both strings are same XST_FAILURE - If there is difference between two strings XST_INVALID_PARAM - Invalid inputs