glitchedhttps
Functions
glitchedhttps_strutil.h File Reference

Useful string-related utility functions. More...

#include <ctype.h>
#include <string.h>
Include dependency graph for glitchedhttps_strutil.h:

Go to the source code of this file.

Functions

GLITCHEDHTTPS_API int glitchedhttps_strncmpic (const char *str1, const char *str2, size_t n)
 
static int glitchedhttps_is_http (const char *url)
 
static int glitchedhttps_is_https (const char *url)
 
static size_t glitchedhttps_count_digits (const size_t number)
 

Detailed Description

Useful string-related utility functions.

Function Documentation

◆ glitchedhttps_count_digits()

static size_t glitchedhttps_count_digits ( const size_t  number)
inlinestatic

Counts how many digits a number has.

Parameters
numberThe number whose digit count you want to know.
Returns
The total amount of digits found.

◆ glitchedhttps_is_http()

static int glitchedhttps_is_http ( const char *  url)
inlinestatic

Checks whether a given string starts with http://.

Parameters
urlThe URL string to check.
Returns
Whether the passed URL has the http scheme at its beginning or not.

◆ glitchedhttps_is_https()

static int glitchedhttps_is_https ( const char *  url)
inlinestatic

Checks whether a given string starts with https://.

Parameters
urlThe URL string to check.
Returns
Whether the passed URL has the https scheme at its beginning or not.

◆ glitchedhttps_strncmpic()

GLITCHEDHTTPS_API int glitchedhttps_strncmpic ( const char *  str1,
const char *  str2,
size_t  n 
)

Compares two strings ignoring UPPER vs. lowercase.

Parameters
str1String to compare.
str2String to compare to.
nHow many characters of the string should be compared (starting from index 0)?
Returns
If the strings are equal, 0 is returned. Otherwise, something else.