Library for ESP32 - String manipulation library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include
src
test
LICENSE
README.md
component.mk

README.md

ESP32-my_string

Library for ESP32 - String manipulation library

Description

Provides functions related to character strings.

Functions

Reference

trim

  • Declaration
char *trim(char *src, const char **blank_string_list);  
  • Description
    Returns a string with leading and trailing blanks removed.
  • Argument
Argument Description
src String to delete leading and trailing whitespace.
Strings are subject to change.
blank_string_list List of strings to be removed as blank characters.
Multibyte characters can also be specified.
You need to place a NULL pointer at the end of the list.
  • Return value
    String with leading and trailing white space removed.
    NULL if the argument contains a NULL pointer.

ltrim

  • Declaration
char *ltrim(char *src, const char **blank_string_list);  
  • Description
    Returns the string with leading blanks removed.
  • Argument
Argument Description
src String to delete trailing white space characters.
blank_string_list List of strings to be removed as blank characters.
Multibyte characters can also be specified.
You need to place a NULL pointer at the end of the list.
  • Return value
    String with leading blanks removed.
    NULL if the argument contains a NULL pointer.

rtrim

  • Declaration
char *rtrim(char *src, const char **blank_string_list);  
  • Description
    Returns a string with trailing blanks removed.
  • Argument
Argument Description
src String to delete trailing white space character.
Strings are subject to change.
blank_string_list List of strings to be removed as blank characters.
Multibyte characters can also be specified.
You need to place a NULL pointer at the end of the list.
  • Return value
    String with trailing blanks removed.
    NULL if the argument contains a NULL pointer.

uppercase

  • Declaration
char *uppercase(char *buf);  
  • Description
    Convert all alphabets to uppercase letters.
  • Argument
Argument Description
buf A string of mixed upper and lower case letters.
Strings are subject to change.
  • Return value
    A string with all alphabets capitalized.

lowercase

  • Declaration
char *lowercase(char *buf);  
  • Description
    Convert all alphabets to lowercase.
  • Argument
Argument Description
buf A string of mixed upper and lower case letters.
Strings are subject to change.
  • Return value
    A string with all alphabets lower case characters.

dump

  • Declaration
void dump(FILE *file, const void *buf, size_t len);  
  • Description
    Output a memory dump of the specified address.
  • Argument
Argument Description
file Specify the file pointer of the output destination.
To output to standard output, specify "stdout".
buf Specify the address of the memory whose contents you want to output.
len Specify the number of bytes to be output.