Lines Matching refs:string
16 #include <string>
34 // string, even when truncation occurs.
57 // BSD-style safe and consistent string copy functions.
66 // Scan a wprintf format string to determine whether it's portable across a
68 // specifiers used by the format string are supported and have the same meaning
70 // within a format string.
107 // Converts the given string to it's ASCII-lowercase equivalent.
108 BASE_EXPORT std::string ToLowerASCII(StringPiece str);
111 // Converts the given string to it's ASCII-uppercase equivalent.
112 BASE_EXPORT std::string ToUpperASCII(StringPiece str);
136 // and then just call the normal string operators on the result.
149 // It is likely faster to construct a new empty string object (just a few
150 // instructions to set the length to 0) than to get the empty string singleton
155 // which need to return a string by reference (e.g. as a class member
156 // accessor), and don't have an empty string to use (e.g. in an error case).
159 BASE_EXPORT const std::string& EmptyString();
170 // Null-terminated string representing the UTF-8 byte order mark.
179 BASE_EXPORT bool RemoveChars(const std::string& input,
181 std::string* output);
185 // the |replace_with| string. Returns true if any characters were replaced.
192 BASE_EXPORT bool ReplaceChars(const std::string& input,
194 const std::string& replace_with,
195 std::string* output);
212 BASE_EXPORT bool TrimString(const std::string& input,
214 std::string* output);
225 // Truncates a string to the nearest UTF-8 character that will leave
226 // the string less than or equal to the specified byte size.
227 BASE_EXPORT void TruncateUTF8ToByteSize(const std::string& input,
229 std::string* output);
231 // Trims any whitespace from either end of the input string.
236 // The std::string versions return where whitespace was found.
243 BASE_EXPORT TrimPositions TrimWhitespaceASCII(const std::string& input,
245 std::string* output);
260 BASE_EXPORT std::string CollapseWhitespaceASCII(
261 const std::string& text,
271 // Returns true if the specified string matches the criteria. How can a wide
272 // string be 8-bit or UTF8? It contains only characters that are < 256 (in the
274 // representation looks like a UTF-8 string (the second case).
293 // Compare the lower-case form of the given string against the given
294 // previously-lower-cased ASCII string (typically a constant).
300 // Performs a case-sensitive string compare of the given 16-bit string against
301 // the given 8-bit ASCII string (typically a constant). The behavior is
302 // undefined if the |ascii| string is not ASCII.
371 // Return a byte string in human-readable format with a unit suffix. Not
385 std::string* str,
402 std::string* str,
411 // the caller wants the data to be managed by a string-like object. It is
413 // avoids copying the results of the call from a char* into a string.
415 // |length_with_null| must be at least 2, since otherwise the underlying string
424 // of the string, and not doing that will mean people who access |str| rather
425 // than str.c_str() will get back a string of whatever size |str| had on entry
427 BASE_EXPORT char* WriteInto(std::string* str, size_t length_with_null);
434 // of strings into a single string, inserting |separator| (which may be empty)
442 BASE_EXPORT std::string JoinString(const std::vector<std::string>& parts,
446 BASE_EXPORT std::string JoinString(const std::vector<StringPiece>& parts,
452 // decide between the string and StringPiece overloads).
453 BASE_EXPORT std::string JoinString(std::initializer_list<StringPiece> parts,
458 // Replace $1-$2-$3..$9 in the format string with values from |subst|.
467 BASE_EXPORT std::string ReplaceStringPlaceholders(
469 const std::vector<std::string>& subst,
472 // Single-string shortcut for ReplaceStringHolders. |offset| may be NULL.
484 #error Define string operations appropriately for your platform