An open API service indexing awesome lists of open source software.

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

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