{"id":20225058,"url":"https://github.com/adwaith-rajesh/strfuncs","last_synced_at":"2026-06-06T04:31:32.264Z","repository":{"id":118590335,"uuid":"519812835","full_name":"Adwaith-Rajesh/strfuncs","owner":"Adwaith-Rajesh","description":"A custom string library in C","archived":false,"fork":false,"pushed_at":"2022-07-31T15:25:59.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T23:24:49.670Z","etag":null,"topics":["c","library","string"],"latest_commit_sha":null,"homepage":"https://gitlab.com/adwaithrajesh/strfuncs","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adwaith-Rajesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-31T15:24:28.000Z","updated_at":"2022-08-01T05:09:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c0e4586-ed51-4ad9-b30f-f97c2c8e613c","html_url":"https://github.com/Adwaith-Rajesh/strfuncs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fstrfuncs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fstrfuncs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fstrfuncs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fstrfuncs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adwaith-Rajesh","download_url":"https://codeload.github.com/Adwaith-Rajesh/strfuncs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241670089,"owners_count":20000324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","library","string"],"created_at":"2024-11-14T07:10:39.888Z","updated_at":"2026-06-06T04:31:32.131Z","avatar_url":"https://github.com/Adwaith-Rajesh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# strfuncs\n\nA custom string library in C\n\nSource Code -\u003e [https://gitlab.com/adwaithrajesh/strfuncs](https://gitlab.com/adwaithrajesh/strfuncs)\n\n## Why a custom C lib\n\nwhy not.\n\n## Usage\n\n- Clone the repo\n  ```bash\n  git clone https://gitlab.com/adwaithrajesh/strfuncs.git\n  ```\n- Compile the library\n\n  ```bash\n  make libstrfuncs.so\n  ```\n\n  This should make a `libstrfuncs.so` file in the current directory.\n  Now you can move the `libstrfuncs.so` file and the header file from the src\n  dir to your preferred dir.\n\n  Lets go through a test use case.\n  After cloning the repo and moving the file, I've the following file structure.\n\n  ```commandline\n  .\n  ├── include\n  │   └── strfuncs.h\n  ├── lib\n  │   └── libstrfuncs.so\n  └── main.c\n  ```\n\n  - contents of `main.c` (and the list of all the available funcs)\n\n  ```c\n  #include \u003cstdio.h\u003e\n\n  #include \"strfuncs.h\"\n\n  int main(void) {\n      printf(\"char count %ld\\n\", char_count(\"Hello World\", 'l'));\n      printf(\"is lower %d\\n\", is_lower(\"hello\"));\n      printf(\"is upper %d\\n\", is_upper(\"HELLO\"));\n      printf(\"is digit %d\\n\", is_digit(\"23423\"));\n      printf(\"is alpha %d\\n\", is_alpha(\"hElLO\"));\n      printf(\"startwith %d\\n\", startswith(\"Hello\", \"He\"));\n  }\n  ```\n\n  - compiling `main.c`\n\n  ```commandline\n  gcc main.c -I./include -L./lib -lstrfuncs -o main\n  ```\n\n  ```commandline\n  LD_LIBRARY_PATH=./lib ./main\n\n  char count 3\n  is lower 1\n  is upper 1\n  is digit 1\n  is alpha 1\n  startwith 1\n  ```\n\n### using strfuncs without making a shared lib\n\nCopy the two file in the `src` dir to your project folder.\n\n```commandline\n.\n├── main.c\n├── strfuncs.c\n└── strfuncs.h\n```\n\nthe you can compile the files to binary using the following command\n\n```commandline\ngcc main.c strfuncs.c -o main\n```\n\n```commandline\n./main\nchar count 3\nis lower 1\nis upper 1\nis digit 1\nis alpha 1\nstartwith 1\n\n```\n\n#### Notes 😀\n\nI'm a complete noob when it comes to C. So if you feel that the code is 'dangerous' or can\nbe made more efficient then please create an issue [here](https://gitlab.com/adwaithrajesh/strfuncs/-/issues) and help me fix my mistake.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadwaith-rajesh%2Fstrfuncs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadwaith-rajesh%2Fstrfuncs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadwaith-rajesh%2Fstrfuncs/lists"}