SS8_AT(3) Ssstr Manual SS8_AT(3)
NAME
ss8_at, ss8_front, ss8_back, ss8_set_at, ss8_set_front, ss8_set_back -
read or modify a single byte in an ssstr byte string
SYNOPSIS
#include <ss8str.h>
char ss8_at(ss8str const *str, size_t pos);
char ss8_front(ss8str const *str);
char ss8_back(ss8str const *str);
ss8str *ss8_set_at(ss8str *str, size_t pos, char ch);
ss8str *ss8_set_front(ss8str *str, char ch);
ss8str *ss8_set_back(ss8str *str, char ch);
DESCRIPTION
ss8_at() reads the byte at position pos in the ss8str pointed to by
str. Behavior is undefined unless str points to a valid ss8str object
and pos is less than the length of the string.
ss8_front() and ss8_back() read the first and last byte, respectively,
in the ss8str pointed to by str. Behavior is undefined unless str
points to a valid ss8str object whose value is non-empty.
ss8_set_at() sets the byte at position pos in the ss8str pointed to by
str, to ch. Behavior is undefined unless str points to a valid ss8str
object and pos is less than the length of the string.
ss8_set_front() and ss8_set_back() set the first and last byte, respecā
tively, in the ss8str pointed to by str, to ch. Behavior is undefined
unless str points to a valid ss8str object whose value is non-empty.
RETURN VALUE
ss8_at() returns the byte at position pos of the ss8str at str.
ss8_front() returns the first byte of the ss8str at str.
ss8_back() returns the last byte of the ss8str at str.
ss8_set_at(), ss8_set_front(), and ss8_set_back() return str.
SEE ALSO
ss8_copy_substr(3), ss8_replace(3), ssstr(7)
SSSTR 2023-12-30 SS8_AT(3)