Python-like String Library
String library similar to Python str functionality
Loading...
Searching...
No Matches
cstrlib

Python-like String Library in C

Description

Implemented the following methods.

  • str_len: Gets the lenght of the string
  • str_init: Initialize the structure
  • str_free: Frees the allocated memory
  • str_count: Count the occurrence of a substring
  • str_getval: Returns the string
  • str_setval: Set a new value for the object
  • str_find: like str.find() in Python
  • str_startswith: like str.startswith() in Python
  • str_endswith: like str.endswith() in Python
  • str_reverse: like str.reverse() in Python
  • str_lstrip: like str.lstrip() in Python
  • str_rstrip: like str.rstrip() in Python
  • str_strip: like str.strip() in Python
  • str_isdigit: like str.isdigit() in Python
  • str_upper: like str.upper() in Python
  • str_lower: like str.lower() in Python
  • str_swapcase: like str.swapcase() in Python
  • str_replace: like str.replace() in Python
  • str_copy: Returns a copy of the string
  • str_split: like str.split() in Python
  • str_append_string: Append a string to the current one
  • str_append_char: Append a character to the current string
  • str_join: join several strings using a seperator

Example

Checks the files in test directory

Docs

Generate the doc using doxygen

doxygen Doxyfile