https://github.com/jbenner-radham/libradham
A Radioactive Hamster C helper library.
https://github.com/jbenner-radham/libradham
Last synced: 7 months ago
JSON representation
A Radioactive Hamster C helper library.
- Host: GitHub
- URL: https://github.com/jbenner-radham/libradham
- Owner: jbenner-radham
- Created: 2013-07-05T02:29:31.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-07T03:27:47.000Z (about 12 years ago)
- Last Synced: 2025-01-22T18:12:17.702Z (9 months ago)
- Language: C
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
libradham
=========### » A Radioactive Hamster C helper library.
Status
------
Currently builds with GCC 4.8 & Clang 3.2 using the -std=c11 flag.To Do
-----
+ Finish a TON more code.
+ Document it.
+ Tons of other magic.
+ ????
+ PROFIT!Functions
---------## String
### Character Position
```C
int rh_str_chrpos(const char*, char);
```
Returns the position of the character you are searching for as an integer.### Has Character?
```C
bool rh_str_haschr(const char* str, char chr);
```
Returns a boolean value indicating whether or not the character you're searching for is in the provided string.### New
```C
char *rh_str_new(const char* src);
```
Returns a mutable copy of the string passed to it on
the heap memory. (The char* returned from this function MUST be
freed by the programmer at a later point.)### Trim - Left
```C
char *rh_str_triml(const char* src);
```
Returns a new string allocated on the heap which has had any whitespace on the left trimmed.### Trim - Right
```C
char *rh_str_trimr(const char* src);
```
Returns a new string allocated on the heap which has had any whitespace on the right trimmed.### Trim
```C
char *rh_str_trim(const char* src);
```
Returns a new string allocated on the heap which has had all outside whitespace trimmed.