-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrings.h
More file actions
45 lines (40 loc) · 758 Bytes
/
strings.h
File metadata and controls
45 lines (40 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* @file strings.h
* @author Stavros Avramidis (stavros9899@gmail.com)
* @brief String manipulation functions
* @version 0.1
* @date 2024-07-26
*
* @copyright Copyright (c) 2024
*
*/
#pragma once
/**
* @brief Calculates the length of a string
*
* @param s
* @return int
*/
int strlen(const char *s);
/**
* @brief Compares two strings
*
* @param s1
* @param s2
* @return int 0 if the strings are equal, a negative number if s1 < s2, a positive number if s1 > s2
*/
int strcmp(const char *s1, const char *s2);
/**
* @brief Copies a string
*
* @param trg
* @param src
*/
void strcpy(char *trg, const char *src);
/**
* @brief Concatenates two strings
*
* @param trg
* @param src
*/
void strcat(char *trg, const char *src);