MCPcopy Create free account
hub / github.com/PDAL/PDAL / binaryString

Function binaryString

plugins/e57/libE57Format/src/StringFunctions.h:114–126  ·  view source on GitHub ↗

@brief Convert number to a binary string

Source from the content-addressed store, hash-verified

112
113 /// @brief Convert number to a binary string
114 inline std::string binaryString( uint8_t x )
115 {
116 std::ostringstream ss;
117 for ( int i = 7; i >= 0; i-- )
118 {
119 ss << ( ( x & ( 1LL << i ) ) ? 1 : 0 );
120 if ( i > 0 && i % 8 == 0 )
121 {
122 ss << " ";
123 }
124 }
125 return ss.str();
126 }
127
128 /// @overload
129 inline std::string binaryString( uint16_t x )

Callers 4

inputProcessAlignedMethod · 0.85
dumpMethod · 0.85
processRecordsMethod · 0.85
dumpMethod · 0.85

Calls 1

strMethod · 0.80

Tested by

no test coverage detected