- Main Page
- Modules
- Classes

- Search for |

# Utilities for formatting strings

## Functions

VOID | LEVEL_BASE::SetAddress0x (BOOL val)
BOOL | LEVEL_BASE::CharIsSpace (CHAR c)
CHAR | LEVEL_BASE::CharToUpper (CHAR c)
string | LEVEL_BASE::ptrstr (const VOID *val)
string | LEVEL_BASE::StringFromAddrint (ADDRINT l)
string | LEVEL_BASE::StringDec (UINT64 l, UINT32 digits, CHAR padding)
string | LEVEL_BASE::StringDecSigned (INT64 l, UINT32 digits, CHAR padding)
string | LEVEL_BASE::StringBignum (INT64 l, UINT32 digits, CHAR padding)
string | LEVEL_BASE::Reformat (const string &s, const string &prefix, UINT32 min_line, UINT32 max_line)
string | LEVEL_BASE::StringHex32 (UINT32 l, UINT32 digits, BOOL prefix_0x)
string | LEVEL_BASE::StringFlt (FLT64 val, UINT32 precision, UINT32 width)
string | LEVEL_BASE::StringBool (BOOL b)
string | LEVEL_BASE::StringTri (TRI t)
string | LEVEL_BASE::StringHex (UINT32 l, UINT32 digits, BOOL prefix_0x=TRUE)
string | LEVEL_BASE::decstr (INT64 val, UINT32 width=0)
string | LEVEL_BASE::decstr (INT32 val, UINT32 width=0)
string | LEVEL_BASE::decstr (INT16 val, UINT32 width=0)
string | LEVEL_BASE::decstr (UINT64 val, UINT32 width=0)
string | LEVEL_BASE::decstr (UINT32 val, UINT32 width=0)
string | LEVEL_BASE::decstr (UINT16 val, UINT32 width=0)
string | LEVEL_BASE::hexstr (INT64 val, UINT32 width=0)
string | LEVEL_BASE::hexstr (INT32 val, UINT32 width=0)
string | LEVEL_BASE::hexstr (INT16 val, UINT32 width=0)
string | LEVEL_BASE::hexstr (UINT64 val, UINT32 width=0)
string | LEVEL_BASE::hexstr (VOID *p, UINT32 width=0)
string | LEVEL_BASE::hexstr (const VOID *p, UINT32 width=0)
string | LEVEL_BASE::hexstr (UINT32 val, UINT32 width=0)
string | LEVEL_BASE::hexstr (UINT16 val, UINT32 width=0)
string | LEVEL_BASE::fltstr (FLT64 val, UINT32 prec=0, UINT32 width=0)
string | LEVEL_BASE::ljstr (const string &s, UINT32 width, CHAR padding= ' ')

## Detailed Description

Availability:
  Mode: JIT & Probe
  O/S: Linux & Windows
  CPU: All

## Function Documentation

BOOL LEVEL_BASE::CharIsSpace | ( | CHAR | c | ) |

| ctype::isspace alternative (avoids complications from including ctype.h).

CHAR LEVEL_BASE::CharToUpper | ( | CHAR | c | ) |

| ctype::toupper alternative (avoids complications from including ctype.h).

string LEVEL_BASE::decstr | ( | UINT16 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given decimal integer.

string LEVEL_BASE::decstr | ( | UINT32 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given decimal integer.

string LEVEL_BASE::decstr | ( | UINT64 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given decimal integer.

string LEVEL_BASE::decstr | ( | INT16 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given decimal integer.

string LEVEL_BASE::decstr | ( | INT32 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given decimal integer.

string LEVEL_BASE::decstr | ( | INT64 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given decimal integer.

string LEVEL_BASE::fltstr | ( | FLT64 | val,
|  | UINT32 | prec = `0`,
|  | UINT32 | width = `0`
| ) |

| Create a string containing the given floating point number.

string LEVEL_BASE::hexstr | ( | UINT16 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | UINT32 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | const VOID * | p,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | VOID * | p,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | UINT64 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | INT16 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | INT32 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::hexstr | ( | INT64 | val,
|  | UINT32 | width = `0`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::ljstr | ( | const string & | s,
|  | UINT32 | width,
|  | CHAR | padding = `' '`
| ) |

| Left justify string.

string LEVEL_BASE::ptrstr | ( | const VOID * | val | ) |

| Print pointer.

string LEVEL_BASE::Reformat | ( | const string & | s,
|  | const string & | prefix,
|  | UINT32 | min_line,
|  | UINT32 | max_line
| ) |

| Add new lines to string to make it fit given line width restrictions.

VOID LEVEL_BASE::SetAddress0x | ( | BOOL | val | ) |

| Set mode for printing of addresses, two formats are available either 0x12345678 or #1234_5678.

string LEVEL_BASE::StringBignum | ( | INT64 | l,
|  | UINT32 | digits,
|  | CHAR | padding
| ) |

| Convert a INT64 into a dec string with 1000 separation . Padding can be specified as well.

string LEVEL_BASE::StringBool | ( | BOOL | b | ) |

| Convert a BOOL into a string.

string LEVEL_BASE::StringDec | ( | UINT64 | l,
|  | UINT32 | digits,
|  | CHAR | padding
| ) |

| Convert a UINT64 into a dec string. Padding can be specified as well.

string LEVEL_BASE::StringDecSigned | ( | INT64 | l,
|  | UINT32 | digits,
|  | CHAR | padding
| ) |

| Convert a INT64 into a dec string. Padding can be specified as well.

string LEVEL_BASE::StringFlt | ( | FLT64 | val,
|  | UINT32 | precision,
|  | UINT32 | width
| ) |

| Convert a FLT64 into a string. Padding can be specified as well.

string LEVEL_BASE::StringFromAddrint | ( | ADDRINT | l | ) |

| Convert a ADDRINT into a string using the hex address format.

string LEVEL_BASE::StringHex | ( | UINT32 | l,
|  | UINT32 | digits,
|  | BOOL | prefix_0x = `TRUE`
| ) |

| Create a string with a hexadecimal prefix containing the given hexadecimal integer.

string LEVEL_BASE::StringHex32 | ( | UINT32 | l,
|  | UINT32 | digits,
|  | BOOL | prefix_0x
| ) |

| Convert a UINT32 into a hex string. Padding can be specified as well.

string LEVEL_BASE::StringTri | ( | TRI | t | ) |

| Convert a TRI into a string.