Namespaces | Macros | Functions | Variables
protobuf/src/google/protobuf/stubs/strutil.cc File Reference
#include <google/protobuf/stubs/strutil.h>
#include <errno.h>
#include <float.h>
#include <limits.h>
#include <stdio.h>
#include <cmath>
#include <iterator>
#include <limits>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/stl_util.h>
Include dependency graph for protobuf/src/google/protobuf/stubs/strutil.cc:

Go to the source code of this file.

Namespaces

 google
 
 google::protobuf
 
 google.protobuf.internal
 
 google::protobuf::strings
 

Macros

#define GET_INPUT(label, remain)
 
#define GOOGLE_DCHECK_NO_OVERLAP(dest, src)
 
#define has_less(x, n)   (((x) - ~0ULL / 255 * (n)) & ~(x) & ~0ULL / 255 * 128)
 
#define IS_OCTAL_DIGIT(c)   (((c) >= '0') && ((c) <= '7'))
 
#define LOG_STRING(LEVEL, VECTOR)   GOOGLE_LOG_IF(LEVEL, false)
 

Functions

static char * google::protobuf::Append1 (char *out, const AlphaNum &x)
 
static char * google::protobuf::Append2 (char *out, const AlphaNum &x1, const AlphaNum &x2)
 
static char * google::protobuf::Append4 (char *out, const AlphaNum &x1, const AlphaNum &x2, const AlphaNum &x3, const AlphaNum &x4)
 
int google::protobuf::Base64Escape (const unsigned char *src, int szsrc, char *dest, int szdest)
 
void google::protobuf::Base64Escape (const unsigned char *src, int szsrc, std::string *dest, bool do_padding)
 
void google::protobuf::Base64Escape (StringPiece src, std::string *dest)
 
int google::protobuf::Base64EscapeInternal (const unsigned char *src, int szsrc, char *dest, int szdest, const char *base64, bool do_padding)
 
void google::protobuf::Base64EscapeInternal (const unsigned char *src, int szsrc, std::string *dest, bool do_padding, const char *base64_chars)
 
bool google::protobuf::Base64Unescape (StringPiece src, std::string *dest)
 
static bool google::protobuf::Base64UnescapeInternal (const char *src, int slen, std::string *dest, const signed char *unbase64)
 
int google::protobuf::Base64UnescapeInternal (const char *src_param, int szsrc, char *dest, int szdest, const signed char *unbase64)
 
int google::protobuf::CalculateBase64EscapedLen (int input_len)
 
int google::protobuf::CalculateBase64EscapedLen (int input_len, bool do_padding)
 
bool google::protobuf::CaseEqual (StringPiece s1, StringPiece s2)
 
std::string google::protobuf::CEscape (const std::string &src)
 
void google::protobuf::CEscapeAndAppend (StringPiece src, std::string *dest)
 
static size_t google::protobuf::CEscapedLength (StringPiece src)
 
int google::protobuf::CEscapeInternal (const char *src, int src_len, char *dest, int dest_len, bool use_hex, bool utf8_safe)
 
std::string google::protobuf::strings::CHexEscape (const std::string &src)
 
void google::protobuf::CleanStringLineEndings (const std::string &src, std::string *dst, bool auto_end_last_line)
 
void google::protobuf::CleanStringLineEndings (std::string *str, bool auto_end_last_line)
 
void google::protobuf::DelocalizeRadix (char *buffer)
 
char * google::protobuf::DoubleToBuffer (double value, char *buffer)
 
int google::protobuf::EncodeAsUTF8Char (uint32 code_point, char *output)
 
char * google::protobuf::FastHex32ToBuffer (uint32 value, char *buffer)
 
char * google::protobuf::FastHex64ToBuffer (uint64 value, char *buffer)
 
char * google::protobuf::FastHexToBuffer (int i, char *buffer)
 
char * google::protobuf::FastInt32ToBuffer (int32 i, char *buffer)
 
char * google::protobuf::FastInt32ToBufferLeft (int32 i, char *buffer)
 
char * google::protobuf::FastInt64ToBuffer (int64 i, char *buffer)
 
char * google::protobuf::FastInt64ToBufferLeft (int64 i, char *buffer)
 
char * google::protobuf::FastUInt32ToBufferLeft (uint32 u, char *buffer)
 
char * google::protobuf::FastUInt64ToBufferLeft (uint64 u64, char *buffer)
 
char * google::protobuf::FloatToBuffer (float value, char *buffer)
 
int google::protobuf::GlobalReplaceSubstring (const std::string &substring, const std::string &replacement, std::string *s)
 
char * google::protobuf::InternalFastHexToBuffer (uint64 value, char *buffer, int num_byte)
 
bool google::protobuf::isprint (char c)
 
static bool google::protobuf::IsValidFloatChar (char c)
 
bool google::protobuf::isxdigit (char c)
 
void google::protobuf::JoinStrings (const std::vector< std::string > &components, const char *delim, std::string *result)
 
template<class ITERATOR >
static void google::protobuf::JoinStringsIterator (const ITERATOR &start, const ITERATOR &end, const char *delim, std::string *result)
 
static int google::protobuf::memcasecmp (const char *s1, const char *s2, size_t len)
 
double google.protobuf.internal::NoLocaleStrtod (const char *str, char **endptr)
 
void google::protobuf::ReplaceCharacters (std::string *s, const char *remove, char replacewith)
 
template<typename IntType >
bool google::protobuf::safe_int_internal (std::string text, IntType *value_p)
 
template<typename IntType >
bool google::protobuf::safe_parse_negative_int (const std::string &text, IntType *value_p)
 
template<typename IntType >
bool google::protobuf::safe_parse_positive_int (std::string text, IntType *value_p)
 
bool google::protobuf::safe_parse_sign (std::string *text, bool *negative_ptr)
 
bool google::protobuf::safe_strto32 (const std::string &str, int32 *value)
 
bool google::protobuf::safe_strto64 (const std::string &str, int64 *value)
 
bool google::protobuf::safe_strtob (StringPiece str, bool *value)
 
bool google::protobuf::safe_strtod (const char *str, double *value)
 
bool google::protobuf::safe_strtof (const char *str, float *value)
 
bool google::protobuf::safe_strtou32 (const std::string &str, uint32 *value)
 
bool google::protobuf::safe_strtou64 (const std::string &str, uint64 *value)
 
template<typename IntType >
bool google::protobuf::safe_uint_internal (std::string text, IntType *value_p)
 
string google::protobuf::SimpleDtoa (double value)
 
string google::protobuf::SimpleFtoa (float value)
 
string google::protobuf::SimpleItoa (int i)
 
string google::protobuf::SimpleItoa (long i)
 
string google::protobuf::SimpleItoa (long long i)
 
string google::protobuf::SimpleItoa (unsigned int i)
 
string google::protobuf::SimpleItoa (unsigned long i)
 
string google::protobuf::SimpleItoa (unsigned long long i)
 
void google::protobuf::SplitStringAllowEmpty (StringPiece full, const char *delim, std::vector< std::string > *result)
 
template<typename ITR >
static void google::protobuf::SplitStringToIteratorAllowEmpty (StringPiece full, const char *delim, int pieces, ITR &result)
 
template<typename ITR >
static void google::protobuf::SplitStringToIteratorUsing (StringPiece full, const char *delim, ITR &result)
 
void google::protobuf::SplitStringUsing (StringPiece full, const char *delim, std::vector< std::string > *result)
 
void google::protobuf::StrAppend (std::string *result, const AlphaNum &a)
 
void google::protobuf::StrAppend (std::string *result, const AlphaNum &a, const AlphaNum &b)
 
void google::protobuf::StrAppend (std::string *result, const AlphaNum &a, const AlphaNum &b, const AlphaNum &c)
 
void google::protobuf::StrAppend (std::string *result, const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d, const AlphaNum &e)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d, const AlphaNum &e, const AlphaNum &f)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d, const AlphaNum &e, const AlphaNum &f, const AlphaNum &g)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d, const AlphaNum &e, const AlphaNum &f, const AlphaNum &g, const AlphaNum &h)
 
string google::protobuf::StrCat (const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d, const AlphaNum &e, const AlphaNum &f, const AlphaNum &g, const AlphaNum &h, const AlphaNum &i)
 
std::string google::protobuf::StringReplace (const std::string &s, const std::string &oldsub, const std::string &newsub, bool replace_all)
 
void google::protobuf::StringReplace (const std::string &s, const std::string &oldsub, const std::string &newsub, bool replace_all, std::string *res)
 
void google::protobuf::StripWhitespace (std::string *str)
 
int32 google::protobuf::strto32_adaptor (const char *nptr, char **endptr, int base)
 
uint32 google::protobuf::strtou32_adaptor (const char *nptr, char **endptr, int base)
 
int google::protobuf::UnescapeCEscapeSequences (const char *source, char *dest)
 
int google::protobuf::UnescapeCEscapeSequences (const char *source, char *dest, std::vector< std::string > *errors)
 
std::string google::protobuf::UnescapeCEscapeString (const std::string &src)
 
int google::protobuf::UnescapeCEscapeString (const std::string &src, std::string *dest)
 
int google::protobuf::UnescapeCEscapeString (const std::string &src, std::string *dest, std::vector< std::string > *errors)
 
int google::protobuf::UTF8FirstLetterNumBytes (const char *src, int len)
 
std::string google::protobuf::strings::Utf8SafeCEscape (const std::string &src)
 
int google::protobuf::WebSafeBase64Escape (const unsigned char *src, int szsrc, char *dest, int szdest, bool do_padding)
 
void google::protobuf::WebSafeBase64Escape (const unsigned char *src, int szsrc, std::string *dest, bool do_padding)
 
void google::protobuf::WebSafeBase64Escape (StringPiece src, std::string *dest)
 
void google::protobuf::WebSafeBase64EscapeWithPadding (StringPiece src, std::string *dest)
 
int google::protobuf::WebSafeBase64Unescape (const char *src, int szsrc, char *dest, int szdest)
 
bool google::protobuf::WebSafeBase64Unescape (StringPiece src, std::string *dest)
 

Variables

static const char google::protobuf::kBase64Chars []
 
static const int google::protobuf::kFastInt32ToBufferOffset = 11
 
static const int google::protobuf::kFastInt64ToBufferOffset = 21
 
static const signed char google::protobuf::kUnBase64 []
 
static const signed char google::protobuf::kUnWebSafeBase64 []
 
static const unsigned char google::protobuf::kUTF8LenTbl [256]
 
static const char google::protobuf::kWebSafeBase64Chars []
 
static const char google::protobuf::two_ASCII_digits [100][2]
 

Macro Definition Documentation

◆ GET_INPUT

#define GET_INPUT (   label,
  remain 
)
Value:
label: \
--szsrc; \
ch = *src++; \
decode = unbase64[ch]; \
if (decode < 0) { \
if (ascii_isspace(ch) && szsrc >= remain) \
goto label; \
state = 4 - remain; \
break; \
}

◆ GOOGLE_DCHECK_NO_OVERLAP

#define GOOGLE_DCHECK_NO_OVERLAP (   dest,
  src 
)
Value:

Definition at line 1569 of file protobuf/src/google/protobuf/stubs/strutil.cc.

◆ has_less

#define has_less (   x,
  n 
)    (((x) - ~0ULL / 255 * (n)) & ~(x) & ~0ULL / 255 * 128)

◆ IS_OCTAL_DIGIT

#define IS_OCTAL_DIGIT (   c)    (((c) >= '0') && ((c) <= '7'))

◆ LOG_STRING

#define LOG_STRING (   LEVEL,
  VECTOR 
)    GOOGLE_LOG_IF(LEVEL, false)
absl::ascii_isspace
bool ascii_isspace(unsigned char c)
Definition: abseil-cpp/absl/strings/ascii.h:95
gen_synthetic_protos.label
label
Definition: gen_synthetic_protos.py:102
GOOGLE_DCHECK_GT
#define GOOGLE_DCHECK_GT
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:200
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
uintptr_t
_W64 unsigned int uintptr_t
Definition: stdint-msvc2008.h:119
tests.qps.qps_worker.dest
dest
Definition: qps_worker.py:45
grpc._common.decode
def decode(b)
Definition: grpc/_common.py:75
ch
char ch
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3621
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:33