FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
text2int.cpp File Reference
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <utils/base/text2int.h>

Macros

#define USE_MAGIC   0 /* set this to 1 if compiler is stupid and implements divide by 10000 using division instruction */
 

Functions

char * uint_to_ascii (uint32_t resultBfr[], uint_fast8_t bfrLen, uint64_t value, uint_fast8_t *retStrLen)
 Quickly convert a binary integer into ASCII decimal text. More...
 
char * int_to_ascii (uint32_t resultBfr[], uint_fast8_t bfrLen, int64_t value, uint_fast8_t *retStrLen)
 Identical to uint_to_ascii(), except that negative values are accepted. More...
 
char * uint_to_ascii_right_justified (uint32_t resultBfr[], uint_fast8_t bfrLen, uint64_t value, uint_fast8_t fieldLen, char fillChar)
 Convert a binary integer into right-justified ASCII decimal text and pad on the left with a specified fill character. More...
 
char * fixedpoint_to_ascii (char *resultBfr, uint_fast8_t bfrLen, int64_t value, uint_fast8_t precision, uint_fast8_t *retStrLen, int_fast8_t outputPrecision)
 Format a fixed-point value with indicated decimal places. More...
 
char * float_to_ascii (char *resultBfr, uint_fast8_t bfrLen, double value, uint_fast8_t *retStrLen, int_fast8_t outputPrecision, bool roundValue)
 Format a double-precision value with indicated decimal places. More...
 
VariableFixedPointValue fast_ascii_to_fixedpoint (const char *str, uint_fast8_t len, int_fast8_t desiredPrecision)
 Convert ASCII decimal text string to fixed point representation. More...
 
double text2double (const char *str, uint_fast8_t len)
 Convert ASCII decimal text string to a double. More...
 

Variables

const char numberAsTwoDigits [100][3]
 Table of 2-character strings representing 00-99. More...
 
const char byteAsLowercaseHexadecimal [256][3]
 Table of uppercase hexadecimal characters for each byte value. More...
 
const char byteAsUppercaseHexadecimal [256][3]
 Table of uppercase hexadecimal characters for each byte value. More...
 
const union Aligned4Chars numberAs4Digits [10000]
 

Macro Definition Documentation

◆ USE_MAGIC

#define USE_MAGIC   0 /* set this to 1 if compiler is stupid and implements divide by 10000 using division instruction */

Variable Documentation

◆ numberAs4Digits

const union Aligned4Chars numberAs4Digits[10000]
Generated: Tue Jul 28 2020 16:03:26
Support Information