Migrate callers of deprecated absl::string_view methods
absl::string_view::Consume --> absl::ConsumePrefix
absl::string_view::ConsumeFromEnd --> absl::ConsumeSuffix
absl::string_view::starts_with --> absl::StartsWith
absl::string_view::ends_with --> absl::EndsWith
absl::string_view::contains --> absl::StrContains
REF_BUG=
REF_CL=181731197
REF_TIME=2018-01-12T08:24:07-05:00
REF_TIME_RAW=1515763447 -0500
Ashley Hedberg
6 years ago
869 | 869 |
DCHECK(result);
|
870 | 870 |
const StringPiece substr = SubStringPiece(src, start, length);
|
871 | 871 |
result->assign(substr.data(), substr.size());
|
|
872 |
}
|
|
873 |
|
|
874 |
bool Util::StartsWith(StringPiece str, StringPiece prefix) {
|
|
875 |
return str.starts_with(prefix);
|
|
876 |
}
|
|
877 |
|
|
878 |
bool Util::EndsWith(StringPiece str, StringPiece suffix) {
|
|
879 |
return str.ends_with(suffix);
|
872 | 880 |
}
|
873 | 881 |
|
874 | 882 |
void Util::StripUTF8BOM(string *line) {
|
253 | 253 |
}
|
254 | 254 |
|
255 | 255 |
// Determines whether the beginning of |str| matches |prefix|.
|
256 | |
static bool StartsWith(StringPiece str, StringPiece prefix) {
|
257 | |
return str.starts_with(prefix);
|
258 | |
}
|
|
256 |
static bool StartsWith(StringPiece str, StringPiece prefix);
|
259 | 257 |
|
260 | 258 |
// Determines whether the end of |str| matches |suffix|.
|
261 | |
static bool EndsWith(StringPiece str, StringPiece suffix) {
|
262 | |
return str.ends_with(suffix);
|
263 | |
}
|
|
259 |
static bool EndsWith(StringPiece str, StringPiece suffix);
|
264 | 260 |
|
265 | 261 |
// Strip a heading UTF-8 BOM (binary order mark) sequence (= \xef\xbb\xbf).
|
266 | 262 |
static void StripUTF8BOM(string *line);
|
29 | 29 |
|
30 | 30 |
MAJOR=2
|
31 | 31 |
MINOR=23
|
32 | |
BUILD=2787
|
|
32 |
BUILD=2788
|
33 | 33 |
REVISION=102
|
34 | 34 |
# This version represents the version of Mozc IME engine (converter, predictor,
|
35 | 35 |
# etc.). This version info is included both in the Mozc server and in the Mozc
|
31 | 31 |
#include "base/file_util.h"
|
32 | 32 |
#include "base/logging.h"
|
33 | 33 |
#include "base/system_util.h"
|
|
34 |
#include "base/util.h"
|
34 | 35 |
#include "testing/base/public/googletest.h"
|
35 | 36 |
|
36 | 37 |
namespace mozc {
|