Useful string-related utility functions.
More...
#include <ctype.h>
#include <string.h>
Go to the source code of this file.
Useful string-related utility functions.
◆ glitchedhttps_count_digits()
static size_t glitchedhttps_count_digits |
( |
const size_t |
number | ) |
|
|
inlinestatic |
Counts how many digits a number has.
- Parameters
-
number | The 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
-
url | The 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
-
url | The 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
-
str1 | String to compare. |
str2 | String to compare to. |
n | How many characters of the string should be compared (starting from index 0)? |
- Returns
- If the strings are equal,
0
is returned. Otherwise, something else.