aboutsummaryrefslogtreecommitdiff
path: root/src/lib/strings.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-24 15:21:54 -0800
committerChristian Cunningham <cc@localhost>2021-12-24 15:21:54 -0800
commit3a366988a0077474075d8f33ad76514d2fa0c5d6 (patch)
tree7aa293e59bee8308825e029069d395c628d230cd /src/lib/strings.c
parentd44bf5acb015edaeacc022f423bae4743b868f53 (diff)
Standardized Formatting
Diffstat (limited to 'src/lib/strings.c')
-rw-r--r--src/lib/strings.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/strings.c b/src/lib/strings.c
index 795caa2..94b315f 100644
--- a/src/lib/strings.c
+++ b/src/lib/strings.c
@@ -1,6 +1,7 @@
#include "../lib/strings.h"
-unsigned long strlen(string_t s) {
+unsigned long strlen(string_t s)
+{
unsigned long len = 0;
while (s[len] != 0) {
len += 1;
@@ -8,7 +9,8 @@ unsigned long strlen(string_t s) {
return len;
}
-unsigned char strcmp(string_t a, string_t b) {
+unsigned char strcmp(string_t a, string_t b)
+{
unsigned long idx = 0;
while (a[idx] != 0 && b[idx] != 0) {
if (a[idx] != b[idx]) {
@@ -19,7 +21,8 @@ unsigned char strcmp(string_t a, string_t b) {
return a[idx] == b[idx];
}
-unsigned char strcmpn(string_t a, string_t b, unsigned int n) {
+unsigned char strcmpn(string_t a, string_t b, unsigned int n)
+{
unsigned long idx = 0;
while (a[idx] != 0 && b[idx] != 0 && idx+1 < n) {
if (a[idx] != b[idx]) {