Xil_SStrCmp_CT - Xil_SStrCmp_CT - 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. This function compares each character of the strings so that execution time of the function is not dependent on the content of two input strings. The execution time is constant when string size are same.

Concatenates source string to destination string

Prototype

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

Parameters

The following table lists the Xil_SStrCmp_CT function arguments.

Table 1. Xil_SStrCmp_CT 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