move files into root of repo
This commit is contained in:
43
strops.h
Normal file
43
strops.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef STROPS_H
|
||||
#define STROPS_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/*
|
||||
All functions return a new heap-allocated string to which the requested operation was applied to.
|
||||
The user of this library is responsible for freeing the memory of the result.
|
||||
No function modifies the input string. The input string is copied at the beginning of a function.
|
||||
Only 7-Bit Ascii is supported.
|
||||
*/
|
||||
|
||||
char* strops_to_lowercase(const char* string);
|
||||
char* strops_to_uppercase(const char* string);
|
||||
int strops_is_lowercase(const char* string);
|
||||
int strops_is_uppercase(const char* string);
|
||||
|
||||
char* strops_insert_at_pos_string(const char* string, const char* string_to_insert, size_t pos);
|
||||
char* strops_remove_at_pos_char(const char* string, size_t pos);
|
||||
|
||||
char* strops_trim_right_whitespace(const char* string);
|
||||
char* strops_trim_left_whitespace(const char* string);
|
||||
char* strops_trim_both_whitespace(const char* string);
|
||||
|
||||
char* strops_trim_right_chars(const char* string, const char* chars_to_remove);
|
||||
char* strops_trim_left_chars(const char* string, const char* chars_to_remove);
|
||||
char* strops_trim_both_chars(const char* string, const char* chars_to_remove);
|
||||
|
||||
char* strops_trim_right_string(const char* string, const char* string_to_remove);
|
||||
char* strops_trim_left_string(const char* string, const char* string_to_remove);
|
||||
char* strops_trim_both_string(const char* string, const char* string_to_remove);
|
||||
|
||||
char* strops_remove_chars(const char* string, const char* chars_to_remove);
|
||||
char* strops_remove_string(const char* string, const char* string_to_remove);
|
||||
|
||||
size_t strops_word_count(const char* string);
|
||||
|
||||
/* https://www.w3schools.com/tags/ref_urlencode.asp */
|
||||
int strops_is_url_encoded(const char* string);
|
||||
char* strops_url_encode(const char* string);
|
||||
char* strops_url_decode(const char* string);
|
||||
|
||||
#endif /* STROPS_H */
|
Reference in New Issue
Block a user