logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

upscli_str_contains_token - Verify that an unique token is present in the string

Description

       The upscli_str_contains_token() function takes the pointer tgt to a caller-provided const char * buffer,
       comprised of unique tokens separated by single space characters (ASCII 0x20), and the pointer token to a
       presumed-contiguous token value that should be found in the tgt buffer.

Name

       upscli_str_contains_token - Verify that an unique token is present in the string

Return Value

       The upscli_str_contains_token() function returns a numeric code:

       •   non-zero if the token value was found in tgt buffer (possibly surrounded by space characters, or
           being at start/end of the string);

       •   0 if token was not found, or if either token or tgt string was NULL or empty.

See Also

upscli_str_add_unique_token(3)

Network UPS Tools 2.8.3                            07/08/2025                            UPSCLI_STR_CONTAINS_(3)

Synopsis

               #include <upsclient.h>

               int     upscli_str_contains_token(const char *string, const char *token);

See Also