![]() |
librnr
1.14.5
RoadNarrows Robotics Common Library 1
|
Simple character manipulations. More...
#include <stdio.h>Go to the source code of this file.
Functions | |
| static char | hexnibbletoa (int h) |
| Convert hex nibble to ascii equivalent. More... | |
| char * | NewPrettyBuf (byte_t buf[], size_t len) |
| Allocates a string buffer and copies a 'prettified' readable version of the contents of the given (binary) buffer. More... | |
| int | PrettyPrintBuf (FILE *fp, byte_t buf[], size_t len) |
| Print out 'prettified' readable version of the contents of the given (binary) buffer. More... | |
Simple character manipulations.
—
Definition in file char.h.
|
inlinestatic |
Convert hex nibble to ascii equivalent.
| h | Hex nibble [0,15]. |
Definition at line 37 of file char.h.
References C_DECLS_END, NewPrettyBuf(), and PrettyPrintBuf().
Referenced by NewPrettyBuf().
| char* NewPrettyBuf | ( | byte_t | buf[], |
| size_t | len | ||
| ) |
Allocates a string buffer and copies a 'prettified' readable version of the contents of the given (binary) buffer.
| buf | Buffer to prettify |
| len | Number of bytes in buf. |
Definition at line 40 of file char.c.
References hexnibbletoa(), and NEWSTR.
Referenced by hexnibbletoa(), and PrettyPrintBuf().
| int PrettyPrintBuf | ( | FILE * | fp, |
| byte_t | buf[], | ||
| size_t | len | ||
| ) |
Print out 'prettified' readable version of the contents of the given (binary) buffer.
| fp | Output file pointer. |
| buf | Buffer to prettify. |
| len | Number of bytes in buf. |
Definition at line 107 of file char.c.
References NewPrettyBuf().
Referenced by hexnibbletoa(), and test_char().