grblHAL core  20260225
strutils.c File Reference
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include "grbl.h"
#include "strutils.h"

Functions

FLASHMEM char * stristr (const char *s1, const char *s2)
 Case insensitive search for first occurrence of a string inside another. More...
 
FLASHMEM char * strnistr (const char *s1, const char *s2, size_t len)
 Case insensitive search for first occurrence of a string inside another. More...
 
FLASHMEM char * strappend (char *buf, int argc,...)
 
FLASHMEM uint32_t strnumentries (const char *s, const char delimiter)
 
FLASHMEM char * strgetentry (char *res, const char *s, uint32_t entry, const char delimiter)
 
FLASHMEM int32_t strlookup (const char *s1, const char *s2, const char delimiter)
 
FLASHMEM bool strtotime (char *s, struct tm *time)
 
FLASHMEM char * strtoisodt (struct tm *dt)
 
FLASHMEM char * strtointernetdt (struct tm *dt)
 

Function Documentation

◆ strappend()

FLASHMEM char* strappend ( char *  buf,
int  argc,
  ... 
)

◆ strgetentry()

FLASHMEM char* strgetentry ( char *  res,
const char *  s,
uint32_t  entry,
const char  delimiter 
)

◆ stristr()

FLASHMEM char* stristr ( const char *  s1,
const char *  s2 
)

Case insensitive search for first occurrence of a string inside another.

Parameters
s1pointer to string to search.
s2pointer to string to search for.
Returns
pointer to found string or NULL if not found.

◆ strlookup()

FLASHMEM int32_t strlookup ( const char *  s1,
const char *  s2,
const char  delimiter 
)

◆ strnistr()

FLASHMEM char* strnistr ( const char *  s1,
const char *  s2,
size_t  len 
)

Case insensitive search for first occurrence of a string inside another.

Parameters
s1pointer to string to search.
s2pointer to string to search for.
lenmax. number of characters to compare.
Returns
pointer to found string or NULL if not found.

◆ strnumentries()

FLASHMEM uint32_t strnumentries ( const char *  s,
const char  delimiter 
)

◆ strtointernetdt()

FLASHMEM char* strtointernetdt ( struct tm dt)

◆ strtoisodt()

FLASHMEM char* strtoisodt ( struct tm dt)

◆ strtotime()

FLASHMEM bool strtotime ( char *  s,
struct tm time 
)