class String
Defined at line 20 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
String builds and stores a null-terminated string representation of a fixed-
point value. A constant-size string buffer is maintained internally in each
instance to permit temporaries in calls to printing/logging functions.
Public Methods
void String ()
Defined at line 22 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
void String (const String & )
Defined at line 23 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
String & operator= (const String & )
Defined at line 24 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
template <typename Integer, size_t FractionalBits>
void String (Fixed<Integer, FractionalBits>value,Modemode,size_tmax_fractional_digits)
Constructs a String containing a string representation of the given fixed-
point value. See Mode for a description of the available modes.
Defined at line 53 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
const char * c_str ()
Returns a pointer to the internal string. The string is guaranteed to be
null-terminated.
Defined at line 68 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
const char * data ()
Returns a pointer to the first element of the internal string buffer.
Defined at line 71 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
size_t size ()
Returns the length of the string.
Defined at line 74 of file ../../zircon/system/ulib/ffl/include/ffl/string.h
Enumerations
enum Mode
| Name | Value | Comments |
|---|---|---|
| Dec | 0 |
The value is rendered as an ordinary decimal number. The fraction is |
| Hex | 1 |
The value is rendered as two unsigned hexidecimal numbers separated by a |
| DecRational | 2 |
The value is rendered as an rational expression of the form:
[optional sign][integer][sign][numerator]/[denominator]
Each number is rendered in base 10. The fraction is not reduced, meaning
Fixed |
Defined at line 26 of file ../../zircon/system/ulib/ffl/include/ffl/string.h