| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #if defined(WEBRTC_POSIX) | 25 #if defined(WEBRTC_POSIX) |
| 26 #ifdef BSD | 26 #ifdef BSD |
| 27 #include <stdlib.h> | 27 #include <stdlib.h> |
| 28 #else // BSD | 28 #else // BSD |
| 29 #include <alloca.h> | 29 #include <alloca.h> |
| 30 #endif // !BSD | 30 #endif // !BSD |
| 31 #endif // WEBRTC_POSIX | 31 #endif // WEBRTC_POSIX |
| 32 | 32 |
| 33 #include <string> | 33 #include <string> |
| 34 | 34 |
| 35 #include "webrtc/base/basictypes.h" | |
| 36 | |
| 37 /////////////////////////////////////////////////////////////////////////////// | 35 /////////////////////////////////////////////////////////////////////////////// |
| 38 // Generic string/memory utilities | 36 // Generic string/memory utilities |
| 39 /////////////////////////////////////////////////////////////////////////////// | 37 /////////////////////////////////////////////////////////////////////////////// |
| 40 | 38 |
| 41 #define STACK_ARRAY(TYPE, LEN) static_cast<TYPE*>(::alloca((LEN)*sizeof(TYPE))) | 39 #define STACK_ARRAY(TYPE, LEN) static_cast<TYPE*>(::alloca((LEN)*sizeof(TYPE))) |
| 42 | 40 |
| 43 namespace rtc { | 41 namespace rtc { |
| 44 | 42 |
| 45 // Complement to memset. Verifies memory consists of count bytes of value c. | 43 // Complement to memset. Verifies memory consists of count bytes of value c. |
| 46 bool memory_check(const void* memory, int c, size_t count); | 44 bool memory_check(const void* memory, int c, size_t count); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 307 |
| 310 // True iff s1 ends with s2. | 308 // True iff s1 ends with s2. |
| 311 bool ends_with(const char *s1, const char *s2); | 309 bool ends_with(const char *s1, const char *s2); |
| 312 | 310 |
| 313 // Remove leading and trailing whitespaces. | 311 // Remove leading and trailing whitespaces. |
| 314 std::string string_trim(const std::string& s); | 312 std::string string_trim(const std::string& s); |
| 315 | 313 |
| 316 } // namespace rtc | 314 } // namespace rtc |
| 317 | 315 |
| 318 #endif // WEBRTC_BASE_STRINGUTILS_H__ | 316 #endif // WEBRTC_BASE_STRINGUTILS_H__ |
| OLD | NEW |