CharBuffer search fixed & Log/Util buffer changed:
- Char/ShiftBuffer: Fixed multi-char string search
- UtilCore: Always pass output buffer & remove own buffer for conversions
- UtilCore: Remove optional parameters to force passing of buffer
- LogCore: Add TempBuffer for output conversion (using UtilCore)
- ApplicationCore: Allow setting size of TempBuffer via config
- Optimize use of {}
This commit is contained in:
12
UtilCore.h
12
UtilCore.h
@@ -17,11 +17,11 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Convert raw bytes to string
|
||||
char * BytesToSafeStr( const char * Bytes, const int Len, const bool NoCrLf = false, const char SpecChar = '.', char * OutBuf = NULL );
|
||||
char * BytesToHexStr( const char * Bytes, const int Len, const char * Separator = " ", char * OutBuf = NULL );
|
||||
char * BytesToBinStr( const char * Bytes, const int Len, const char * Separator = " ", char * OutBuf = NULL );
|
||||
char * BytesToSafeStr( const char * Bytes, const int Len, const bool NoCrLf, const char SpecChar, char * OutBuf );
|
||||
char * BytesToHexStr( const char * Bytes, const int Len, const char * Separator, char * OutBuf );
|
||||
char * BytesToBinStr( const char * Bytes, const int Len, const char * Separator, char * OutBuf );
|
||||
|
||||
char * IntToBinStr( const int Bytes, const int Len, const char * Separator = " ", char * OutBuf = NULL );
|
||||
char * IntToBinStr( const int Bytes, const int Len, const char * Separator, char * OutBuf );
|
||||
|
||||
// Convert string to raw bytes
|
||||
inline u_int8_t HexToInt( char Digit ) {
|
||||
@@ -30,8 +30,8 @@ inline u_int8_t HexToInt( char Digit ) {
|
||||
else if ((Digit >= 'a') && (Digit <= 'f')) return (Digit - 'a'+10);
|
||||
else return 0;
|
||||
}
|
||||
char * HexStrToBytes( const char * Str, const int Len, const char * Separator = NULL, char * OutBuf = NULL );
|
||||
char * BinStrToBytes( const char * Str, const int Len, const char * Separator = NULL, char * OutBuf = NULL );
|
||||
char * HexStrToBytes( const char * Str, const int Len, const char * Separator, char * OutBuf );
|
||||
char * BinStrToBytes( const char * Str, const int Len, const char * Separator, char * OutBuf );
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user