Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 2.29 KB

File metadata and controls

58 lines (35 loc) · 2.29 KB

INTRODUCTION

String utils is a library that contains all the functions to manipulate strings. It's just basic functions as you may know, but it's a good start to manipulate strings and it will be usefull in the future.

TABLE OF CONTENTS

How it works ?

This is containing all the functions to manipulate strings. It's just basic functions as you may know, but it's a good start to manipulate strings and it will be usefull in the future. All the functions are stored in the src/utils/string/ folder.

How to use it ?

The string utils is a library that contains all the functions to manipulate strings. It's just basic functions as you may know, but it's a good start to manipulate strings and it will be usefull in the future. It's providing an API named string.h that contains all the functions. Only this file must be included to use the string utils.

Functions list

itoa

This function convert an integer to a string into the given base. It will return nothing but the final string will be stored in the buffer given in parameter. The buffer must be big enough to store the string.

Here is the prototype of the function:

void itoa(int num, char *str, uint8_t base);

revstr

This function reverse a string. It will return nothing but the final string will be stored in the buffer given in parameter.

Here is the prototype of the function:

void revstr(char *str);

strlen

This function return the length of the string given in parameter.

Here is the prototype of the function:

size_t strlen(const char *str);

Want to contribute ?

If you want to contribute to this utils, you can add your own function, please make sure that the code is clean and that it's working. If you want to add a function, please add it in the string.h file and add the documentation in the string.md file.