Page Speed Optimization Libraries  1.3.25.1
Classes | Namespaces | Defines | Typedefs | Functions
net/instaweb/util/public/string_util.h File Reference
#include <map>
#include <set>
#include <vector>
#include "base/stringprintf.h"
#include "net/instaweb/util/public/basictypes.h"
#include "net/instaweb/util/public/string.h"
#include <cstdlib>
#include <string>
#include "base/string_number_conversions.h"
#include "base/string_piece.h"
#include "base/string_util.h"

Go to the source code of this file.

Classes

class  net_instaweb::EmptyString
struct  net_instaweb::CharStarCompareInsensitive
struct  net_instaweb::CharStarCompareSensitive
struct  net_instaweb::StringCompareSensitive
struct  net_instaweb::StringCompareInsensitive

Namespaces

namespace  net_instaweb
 

for StringPiece


Defines

#define STATIC_STRLEN(static_string)   (arraysize(static_string) - 1)

Typedefs

typedef StringPiece::size_type stringpiece_ssize_type
typedef std::map< GoogleString,
GoogleString
net_instaweb::StringStringMap
typedef std::map< GoogleString,
int > 
net_instaweb::StringIntMap
typedef std::set< GoogleStringnet_instaweb::StringSet
typedef std::set< GoogleString,
StringCompareInsensitive > 
net_instaweb::StringSetInsensitive
typedef std::vector< GoogleStringnet_instaweb::StringVector
typedef std::vector< StringPiece > net_instaweb::StringPieceVector
typedef std::vector< const
GoogleString * > 
net_instaweb::ConstStringStarVector
typedef std::vector
< GoogleString * > 
net_instaweb::StringStarVector
typedef std::vector< const char * > net_instaweb::CharStarVector

Functions

GoogleString net_instaweb::IntegerToString (int i)
GoogleString net_instaweb::UintToString (unsigned int i)
GoogleString net_instaweb::Integer64ToString (int64 i)
GoogleString net_instaweb::PointerToString (void *pointer)
bool net_instaweb::StringToInt (const char *in, int *out)
bool net_instaweb::StringToInt64 (const char *in, int64 *out)
bool net_instaweb::StringToInt (const GoogleString &in, int *out)
bool net_instaweb::StringToInt64 (const GoogleString &in, int64 *out)
StringPiece net_instaweb::PieceAfterEquals (const StringPiece &piece)
GoogleString net_instaweb::StrCat (const StringPiece &a, const StringPiece &b, const StringPiece &c=EmptyString::kEmptyString, const StringPiece &d=EmptyString::kEmptyString, const StringPiece &e=EmptyString::kEmptyString, const StringPiece &f=EmptyString::kEmptyString, const StringPiece &g=EmptyString::kEmptyString, const StringPiece &h=EmptyString::kEmptyString)
void net_instaweb::StrAppend (GoogleString *target, const StringPiece &a, const StringPiece &b=EmptyString::kEmptyString, const StringPiece &c=EmptyString::kEmptyString, const StringPiece &d=EmptyString::kEmptyString, const StringPiece &e=EmptyString::kEmptyString, const StringPiece &f=EmptyString::kEmptyString, const StringPiece &g=EmptyString::kEmptyString, const StringPiece &h=EmptyString::kEmptyString)
void net_instaweb::SplitStringPieceToVector (const StringPiece &sp, const StringPiece &separators, StringPieceVector *components, bool omit_empty_strings)
void net_instaweb::SplitStringUsingSubstr (const StringPiece &full, const StringPiece &substr, StringPieceVector *result)
void net_instaweb::BackslashEscape (const StringPiece &src, const StringPiece &to_escape, GoogleString *dest)
GoogleString net_instaweb::CEscape (const StringPiece &src)
bool net_instaweb::HasPrefixString (const StringPiece &str, const StringPiece &prefix)
void net_instaweb::UpperString (GoogleString *str)
void net_instaweb::LowerString (GoogleString *str)
bool net_instaweb::OnlyWhitespace (const GoogleString &str)
int net_instaweb::GlobalReplaceSubstring (const StringPiece &substring, const StringPiece &replacement, GoogleString *s)
int net_instaweb::FindIgnoreCase (StringPiece haystack, StringPiece needle)
GoogleString net_instaweb::JoinStringStar (const ConstStringStarVector &vector, const StringPiece &delim)
GoogleString net_instaweb::JoinStringPieces (const StringPieceVector &vector, int start_index, int size, const StringPiece &delim)
GoogleString net_instaweb::JoinStringPieces (const StringPieceVector &vector, const StringPiece &delim)
char net_instaweb::UpperChar (char c)
char net_instaweb::LowerChar (char c)
char * net_instaweb::strdup (const char *str)
int net_instaweb::StringCaseCompare (const StringPiece &s1, const StringPiece &s2)
 Case-insensitive string comparison that is locale-independent.
bool net_instaweb::IsAsciiAlphaNumeric (char ch)
void net_instaweb::TrimWhitespace (const StringPiece &in, GoogleString *output)
void net_instaweb::TrimWhitespace (StringPiece *str)
void net_instaweb::TrimQuote (StringPiece *str)
 In-place removal of leading and trailing quote.
void net_instaweb::TrimLeadingWhitespace (StringPiece *str)
 Trims only whitespace at the beginning of the string.
bool net_instaweb::AccumulateDecimalValue (char c, uint32 *value)
bool net_instaweb::AccumulateHexValue (char c, uint32 *value)
bool net_instaweb::StringCaseEqual (const StringPiece &s1, const StringPiece &s2)
 Return true iff the two strings are equal, ignoring case.
bool net_instaweb::StringCaseStartsWith (const StringPiece &str, const StringPiece &prefix)
 Return true iff str starts with prefix, ignoring case.
bool net_instaweb::StringCaseEndsWith (const StringPiece &str, const StringPiece &suffix)
 Return true iff str ends with suffix, ignoring case.
bool net_instaweb::StringEqualConcat (const StringPiece &str, const StringPiece &first, const StringPiece &second)
bool net_instaweb::EndsInSlash (const StringPiece &path)
 Does a path end in slash?
void net_instaweb::EnsureEndsInSlash (GoogleString *dir)
 Make sure directory's path ends in '/'.
void net_instaweb::ParseShellLikeString (const StringPiece &input, std::vector< GoogleString > *output)
int net_instaweb::CountSubstring (const StringPiece &text, const StringPiece &substring)
bool net_instaweb::HasIllicitTokenCharacter (const StringPiece &str)
GoogleStringnet_instaweb::StringVectorAdd (StringVector *v)
 Appends new empty string to a StringVector and returns a pointer to it.

Detailed Description


Define Documentation

#define STATIC_STRLEN (   static_string)    (arraysize(static_string) - 1)

Quick macro to get the size of a static char[] without trailing '\0'. Note: Cannot be used for char*, std::string, etc.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines