/*
 * Copyright (c) 2026, Chloe M., et al
 * Provided under the BSD-3 clause.
 *
 * Description:  String libraries
 * Author:       Chloe M.
 */

#ifndef _SPKG_STRING_H_
#define _SPKG_STRING_H_ 1

#include <ptdef.h>

/*
 * Obtain the length of a string
 *
 * @String:  String to obtain length of
 */
USIZE RtlStrLen(const CHAR *String);

/*
 * Compare the differences between two strings
 *
 * @Buffer1: First buffer to compare
 * @Buffer2: Second buffer to compare
 * @Length:  Number of bytes to compare
 *
 * Returns the differences
 */
LONG RtlMemCmp(const VOID *Buffer1, const VOID *Buffer2, USIZE Length);

/*
 * Check if two strings are equal
 *
 * @String1: First string to compare
 * @String2: Second string to compare
 *
 * Returns true if the two strings are equal
 */
BOOLEAN RtlStrEq(const CHAR *String1, const CHAR *String2);

/*
 * Fill n bytes of a buffer with a value
 *
 * @Buffer:     Pointer to buffer to fill
 * @SetValue:   Value to fill with
 * @Length:     Number of bytes to fill
 *
 * Returns @Buffer on success, otherwise NULL on failure
 */
VOID *RtlMemSet(VOID *Buffer, LONG SetValue, USIZE Length);

/*
 * Copy n bytes of one buffer to another
 *
 * @Dest: Destination buffer
 * @Soruce: Source buffer
 * @Length: Length of buffers
 *
 * Returns @Dest on suucess, otherwise NULL on failure
 */
VOID *RtlMemCpy(VOID *Dest, const VOID *Source, USIZE Length);

#endif  /* !_SPKG_STRING_H_ */
