https://github.com/tony-go/string_lib
Let's implement the C string library
https://github.com/tony-go/string_lib
Last synced: 13 days ago
JSON representation
Let's implement the C string library
- Host: GitHub
- URL: https://github.com/tony-go/string_lib
- Owner: tony-go
- Created: 2021-12-17T19:58:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-22T21:29:05.000Z (over 3 years ago)
- Last Synced: 2025-03-29T15:32:22.335Z (3 months ago)
- Language: C
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
string_lib
Let's implement the C string library
## API
### str_len
Return the length of the string.
```c
size_t str_len(const char *s);
```### str_cmp
Return `-1`, `0` or `1` if `s1` (or the first n bytes thereof) is found, respectively, to be less than, to match, or be greater than `s2`.
```c
int str_cmp(const char *s1, const char *s2);
```## Requirement
* C compiler of your choice
* make## Commands
- Run program:
```bash
$ make use
```- Build sources only:
```bash
$ make build
```## Links
* https://github.com/openbsd/src/blob/master/include/string.h
* https://linux.die.net/man/3/string
* https://github.com/capitnflam/6502/blob/master/CMakeLists.txt
* https://github.com/capitnflam/6502/blob/master/lib6502/CMakeLists.txt