Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: base/string_util.h

Issue 7238012: Upstream android debug and log related files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed port.h Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file defines utility functions for working with strings. 5 // This file defines utility functions for working with strings.
6 6
7 #ifndef BASE_STRING_UTIL_H_ 7 #ifndef BASE_STRING_UTIL_H_
8 #define BASE_STRING_UTIL_H_ 8 #define BASE_STRING_UTIL_H_
9 #pragma once 9 #pragma once
10 10
11 #include <stdarg.h> // va_list 11 #include <stdarg.h> // va_list
12 12
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/base_api.h" 16 #include "base/base_api.h"
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "base/compiler_specific.h" 18 #include "base/compiler_specific.h"
19 #include "base/string16.h" 19 #include "base/string16.h"
20 #include "base/string_piece.h" // For implicit conversions. 20 #include "base/string_piece.h" // For implicit conversions.
21 21
22 // TODO(brettw) remove this dependency. Previously StringPrintf lived in this 22 // TODO(brettw) remove this dependency. Previously StringPrintf lived in this
23 // file. We need to convert the callers over to using stringprintf.h instead 23 // file. We need to convert the callers over to using stringprintf.h instead
24 // and then remove this. 24 // and then remove this.
25 #include "base/stringprintf.h" 25 #include "base/stringprintf.h"
26 26
27 #if defined(OS_ANDROID)
28 #include <ctype.h>
29 #endif
30
27 // Safe standard library wrappers for all platforms. 31 // Safe standard library wrappers for all platforms.
28 32
29 namespace base { 33 namespace base {
30 34
31 // C standard-library functions like "strncasecmp" and "snprintf" that aren't 35 // C standard-library functions like "strncasecmp" and "snprintf" that aren't
32 // cross-platform are provided as "base::strncasecmp", and their prototypes 36 // cross-platform are provided as "base::strncasecmp", and their prototypes
33 // are listed below. These functions are then implemented as inline calls 37 // are listed below. These functions are then implemented as inline calls
34 // to the platform-specific equivalents in the platform-specific headers. 38 // to the platform-specific equivalents in the platform-specific headers.
35 39
36 // Compares the two strings s1 and s2 without regard to case using 40 // Compares the two strings s1 and s2 without regard to case using
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 #elif defined(WCHAR_T_IS_UTF32) 539 #elif defined(WCHAR_T_IS_UTF32)
536 typedef uint32 Unsigned; 540 typedef uint32 Unsigned;
537 #endif 541 #endif
538 }; 542 };
539 template<> 543 template<>
540 struct ToUnsigned<short> { 544 struct ToUnsigned<short> {
541 typedef unsigned short Unsigned; 545 typedef unsigned short Unsigned;
542 }; 546 };
543 547
544 #endif // BASE_STRING_UTIL_H_ 548 #endif // BASE_STRING_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698