0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Functions | Variables
String.cc File Reference

A String class based on std::string. More...

#include "Common/Compat.h"
#include <cstdarg>
#include <cstdio>
#include <algorithm>
#include "String.h"
Include dependency graph for String.cc:

Go to the source code of this file.

Namespaces

 Hypertable
 Hypertable definitions
 

Functions

String Hypertable::format (const char *fmt,...) __attribute__((format(printf
 Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this, which is about: 10x faster than boost::format; 1.5x faster than std::string append (operator+=); 3.5x faster than std::string operator+;. More...
 
String Hypertable::format_number (int64_t n, int sep= ',')
 Return decimal number string separated by a separator (default: comma) for every 3 digits. More...
 
String Hypertable::format_bytes (size_t n, const void *buf, size_t len, const char *trailer="...")
 Return first n bytes of buffer with an optional trailer if the size of the buffer exceeds n. More...
 

Variables

char const *const Hypertable::digits = "0123456789"
 

Detailed Description

A String class based on std::string.

Definition in file String.cc.