MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / trim

Function trim

config.c:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "config.h"
22
23static void trim(char *str) {
24 int len = strlen(str);
25 int i;
26
27 for (i = len - 1; i >= 0; i--) {
28 if (str[i] == 0x20 || str[i] == '\t') {
29 str[i] = 0;
30 } else {
31 break;
32 }
33 }
34}
35
36static int GetLine(char *buf, int size, char *str) {
37 uint8_t ch = 0;

Callers 2

GetLineFunction · 0.85
readEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected