| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 BLINK_COMMON_EXPORT std::string utf8() const; | 88 BLINK_COMMON_EXPORT std::string utf8() const; |
| 89 | 89 |
| 90 BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data, size_t lengt
h); | 90 BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data, size_t lengt
h); |
| 91 BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data); | 91 BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data); |
| 92 | 92 |
| 93 static WebString fromUTF8(const std::string& s) | 93 static WebString fromUTF8(const std::string& s) |
| 94 { | 94 { |
| 95 return fromUTF8(s.data(), s.length()); | 95 return fromUTF8(s.data(), s.length()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 BLINK_COMMON_EXPORT static WebString fromUTF8Lenient(const char* data, size_
t length); |
| 99 |
| 100 static WebString fromUTF8Lenient(const std::string& s) |
| 101 { |
| 102 return fromUTF8Lenient(s.data(), s.length()); |
| 103 } |
| 104 |
| 98 BLINK_COMMON_EXPORT std::string latin1() const; | 105 BLINK_COMMON_EXPORT std::string latin1() const; |
| 99 | 106 |
| 100 BLINK_COMMON_EXPORT static WebString fromLatin1(const WebLChar* data, size_t
length); | 107 BLINK_COMMON_EXPORT static WebString fromLatin1(const WebLChar* data, size_t
length); |
| 101 | 108 |
| 102 static WebString fromLatin1(const std::string& s) | 109 static WebString fromLatin1(const std::string& s) |
| 103 { | 110 { |
| 104 return fromLatin1(reinterpret_cast<const WebLChar*>(s.data()), s.length(
)); | 111 return fromLatin1(reinterpret_cast<const WebLChar*>(s.data()), s.length(
)); |
| 105 } | 112 } |
| 106 | 113 |
| 107 template <int N> WebString(const char (&data)[N]) | 114 template <int N> WebString(const char (&data)[N]) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 206 } |
| 200 | 207 |
| 201 inline bool operator!=(const WebString& a, const WebString& b) | 208 inline bool operator!=(const WebString& a, const WebString& b) |
| 202 { | 209 { |
| 203 return !(a == b); | 210 return !(a == b); |
| 204 } | 211 } |
| 205 | 212 |
| 206 } // namespace blink | 213 } // namespace blink |
| 207 | 214 |
| 208 #endif | 215 #endif |
| OLD | NEW |