MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / reverse

Function reverse

Kernel/src/string.cpp:7–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <paging.h>
6
7void reverse(char *str, int length)
8{
9 int c;
10 char *begin, *end, temp;
11
12 begin = str;
13 end = str;
14
15 for (c = 0; c < length - 1; c++)
16 end++;
17
18 for (c = 0; c < length/2; c++)
19 {
20 temp = *end;
21 *end = *begin;
22 *begin = temp;
23
24 begin++;
25 end--;
26 }
27}
28
29char* itoa(unsigned long long num, char* str, int base)
30{

Callers 1

itoaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected