Skip to content

Commit 0c12136

Browse files
authored
Update README.md
1 parent dc80d1a commit 0c12136

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

pointers_arrays_strings/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ the differences between the two as well as how to use and manipulate strings in
4141
| `5-string_toupper.c` | `char *string_toupper(char *);` |
4242
| `6-cap_string.c` | `char *cap_string(char *);` |
4343
| `7-leet.c` | `char *leet(char *);` |
44+
| `0-memset.c` | `char *_memset(char *s, char b, unsigned int n);` |
45+
| `1-memcpy.c` | `char *_memcpy(char *dest, char *src, unsigned int n);` |
46+
| `2-strchr.c` | `char *_strchr(char *s, char c);` |
47+
| `3-strspn.c` | `unsigned int _strspn(char *s, char *accept);` |
48+
| `4-strpbrk.c` | `char *_strpbrk(char *s, char *accept);` |
49+
| `5-strstr.c` | `char *_strstr(char *haystack, char *needle);` |
50+
| `7-print_chessboard.c` | `void print_chessboard(char (*a)[8]);` |
4451

4552
## Formatting and Examples :nerd_face:
4653
<details open>
@@ -174,3 +181,41 @@ julien@ubuntu:~/$
174181
* Letters `t` and `T` are replaced by `7`.
175182
* Letters `l` and `L` are replaced by `1`.
176183

184+
<p align="center">
185+
<img src= "https://s3.eu-west-3.amazonaws.com/hbtn.intranet.project.files/holbertonschool-low_level_programming/218/58fe6b229144b7fe5ebe88afe9ff5cabe2dd0863e1e79b2d02b4103c30b465dd.jpg">
186+
187+
* **0. memset**
188+
* [0-memset.c](./0-memset.c): C function that fills the first `n` bytes of
189+
memory area pointed to by `s` with the constant byte `b`.
190+
* Returns a pointer to the filled memory area `s`.
191+
192+
* **1. memcpy**
193+
* [1-memcpy.c](./1-memcpy.c): C function that copies `n` bytes from memory
194+
area `src` to memory area `dest`.
195+
* Returns a pointer to the memory area `dest`.
196+
197+
* **2. strchr**
198+
* [2-strchr.c](./2-strchr.c): C function that returns a pointer to the first occurence of
199+
the character `c` in the string `s`.
200+
* If the character is not found, the function returns `NULL`.
201+
202+
* **3. strspn**
203+
* [3-strspn.c](./3-strspn.c): C function that returns the number of bytes in the intitial
204+
segment of memory area `s` which consist only of bytes from a substring `accept`.
205+
206+
* **4. strpbrk**
207+
* [4-strpbrk.c](./4-strpbrk.c): C function that locates the first occurence in a
208+
string `s` of any of the bytes in a string `accept`.
209+
* Returns a pointer to the byte in `s` that matches one of the bytes in `accept`.
210+
* If no matching byte is found, the function returns `NULL`.
211+
212+
* **5. strstr**
213+
* [5-strstr.c](./5-strstr.c): C function that finds the first occurence of a
214+
substring `needle` in a string `haystack`.
215+
* The terminating null bytes (`\0`) are not compared.
216+
* Returns a pointer to the beginning of the located substring.
217+
* If the substring is not found, the function returns `NULL`.
218+
219+
* **6. Chess is mental torture**
220+
* [7-print_chessboard.c](./7-print_chessboard.c): C function that prints the chessboard.
221+

0 commit comments

Comments
 (0)