Move string functions/utils from HAL to std/string

This commit is contained in:
2025-11-11 19:54:09 +01:00
parent f5dae4984d
commit 344952fb5f
27 changed files with 200 additions and 228 deletions

View File

@ -1,5 +1,6 @@
#include "path.h"
#include "hal/hal.h"
#include "std/string.h"
void path_parse(const char *in, char *mp, char *path) {
if (in == 0 || *in == 0) {
@ -45,8 +46,8 @@ void path_parse(const char *in, char *mp, char *path) {
return;
}
if (hal_strstr(path, "/../") || hal_strstr(path, "/./")
|| hal_strcmp(path, "..") == 0 || hal_strcmp(path, ".") == 0) {
if (strstr(path, "/../") || strstr(path, "/./")
|| strcmp(path, "..") == 0 || strcmp(path, ".") == 0) {
mp[0] = 0;
path[0] = 0;
return;