#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <ctype.h>#include <ngc/core/ngcb.h>Macros | |
| #define | _GNU_SOURCE |
| #define | _REENTRANT |
Functions | |
| void | ngcbToLower (char *s) |
| void | ngcbToUpper (char *s) |
| void | ngcbCleanSpace (char *s) |
| void | ngcbTrimSpace (char *s) |
| void | ngcbStrPut (char *s1, const char *s2) |
| int | ngcbReplaceEnv (char *string, char *erms) |
| int | ngcbIsFloat (const char *s) |
| void | ngcbStr2Arg (char *s, int *argc, char **argv) |
| char * | ngcbStr2Str (char *s1, const char *s2, size_t n) |
| int | ngcbStr2Int (const char *s, int *value) |
| int | ngcbStr2UInt (const char *s, unsigned int *value) |
| int | ngcbHex2Int (const char *s, int *value) |
| int | ngcbHex2UInt (const char *s, unsigned int *value) |
| int | ngcbFmt2Int (const char *s, int *value) |
| int | ngcbFmt2UInt (const char *s, unsigned int *value) |
| int | ngcbStr2Int16 (const char *s, short *value) |
| int | ngcbStr2UInt16 (const char *s, unsigned short *value) |
| int | ngcbHex2Int16 (const char *s, short *value) |
| int | ngcbHex2UInt16 (const char *s, unsigned short *value) |
| int | ngcbStr2Float (const char *s, float *value) |
| int | ngcbStr2Double (const char *s, double *value) |
| int | ngcbF2S (const char *s, const char *filter, char *v) |
| int | ngcbF2Int (const char *s, const char *filter) |
| unsigned int | ngcbF2UInt (const char *s, const char *filter) |
| int | ngcbF2Double (const char *s, const char *filter, double *v) |
| int | ngcbStr2Frac (const char *value, unsigned int n, uint64_t *v1, uint64_t *v2) |
| #define _GNU_SOURCE |
| #define _REENTRANT |
| void ngcbCleanSpace | ( | char * | s | ) |
Remove all extra spaces in string.
| int ngcbF2Double | ( | const char * | s, |
| const char * | filter, | ||
| double * | v ) |
Get filtered string option (double precision floating point).
| int ngcbF2Int | ( | const char * | s, |
| const char * | filter ) |
Get filtered string option (32-bit signed integer).
| int ngcbF2S | ( | const char * | s, |
| const char * | filter, | ||
| char * | v ) |
Get filtered string option.
| unsigned int ngcbF2UInt | ( | const char * | s, |
| const char * | filter ) |
Get filtered string option (32-bit unsigned integer).
| int ngcbFmt2Int | ( | const char * | s, |
| int * | value ) |
Get 32-bit signed integer value from string, using 0x and 0b as format indicator.
| int ngcbFmt2UInt | ( | const char * | s, |
| unsigned int * | value ) |
Get 32-bit unsigned signed integer value from string, using "0x" and "0b" as format indicator.
| int ngcbHex2Int | ( | const char * | s, |
| int * | value ) |
Get 32-bit signed integer value from hexadecimal keyword string.
| int ngcbHex2Int16 | ( | const char * | s, |
| short * | value ) |
Get 16-bit signed integer value from hexadecimal keyword string.
| int ngcbHex2UInt | ( | const char * | s, |
| unsigned int * | value ) |
Get 32-bit unsigned integer value from hexadecimal keyword string.
| int ngcbHex2UInt16 | ( | const char * | s, |
| unsigned short * | value ) |
Get 16-bit unsigned integer value from hexadecimal keyword string.
| int ngcbIsFloat | ( | const char * | s | ) |
Return 1, if the string represents a floating point number, otherwise zero is returned.
| int ngcbReplaceEnv | ( | char * | string, |
| char * | erms ) |
Replace the environment variables in the given string.
| void ngcbStr2Arg | ( | char * | s, |
| int * | argc, | ||
| char ** | argv ) |
Convert a string to command line arguments.
| int ngcbStr2Double | ( | const char * | s, |
| double * | value ) |
Get double precision floating point value from keyword string.
| int ngcbStr2Float | ( | const char * | s, |
| float * | value ) |
Get single precision floating point value from string.
| int ngcbStr2Frac | ( | const char * | value, |
| unsigned int | n, | ||
| uint64_t * | v1, | ||
| uint64_t * | v2 ) |
Fraction with binary fixed-point after n digits
| int ngcbStr2Int | ( | const char * | s, |
| int * | value ) |
Get 32-bit signed integer value from decimal string.
| int ngcbStr2Int16 | ( | const char * | s, |
| short * | value ) |
Get 16-bit signed integer value from decimal string.
| char * ngcbStr2Str | ( | char * | s1, |
| const char * | s2, | ||
| size_t | n ) |
Copy n characters of one string to another (null terminated).
| int ngcbStr2UInt | ( | const char * | s, |
| unsigned int * | value ) |
Get 32-bit unsigned integer value from decimal keyword string.
| int ngcbStr2UInt16 | ( | const char * | s, |
| unsigned short * | value ) |
Get 16-bit unsigned integer value from decimal keyword string.
| void ngcbStrPut | ( | char * | s1, |
| const char * | s2 ) |
Put string s2 ahead of string s1.
| void ngcbToLower | ( | char * | s | ) |
Convert all characters in string to lower case.
| void ngcbToUpper | ( | char * | s | ) |
Convert all characters in string to upper case.
| void ngcbTrimSpace | ( | char * | s | ) |
Remove leading and trailing spaces in string.