Skip to content

jbenner-radham/libradham

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

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

int rh_str_chrpos(const char*, char);

Returns the position of the character you are searching for as an integer.

Has Character?

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

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

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

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

char *rh_str_trim(const char* src);

Returns a new string allocated on the heap which has had all outside whitespace trimmed.

About

A Radioactive Hamster C helper library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages