chromium/third_party/libphonenumber/dist/cpp/src/phonenumbers/stringutil.cc

// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Philippe Liard

#include <algorithm>
#include <cassert>
#include <cstring>
#include <sstream>

#include "phonenumbers/stringutil.h"

#include "absl/strings/str_replace.h"
#include "absl/strings/substitute.h"
#include "absl/strings/match.h"

namespace i18n {
namespace phonenumbers {

equal;
stringstream;

string operator+(const string& s, int n) {}

string SimpleItoa(int n) {}

string SimpleItoa(uint64 n) {}

string SimpleItoa(int64 n) {}

bool HasPrefixString(const string& s, const string& prefix) {}

size_t FindNth(const string& s, char c, int n) {}

void SplitStringUsing(const string& s, char delimiter,
                      vector<string>* result) {}

bool TryStripPrefixString(const string& in, const string& prefix, string* out) {}

bool HasSuffixString(const string& s, const string& suffix) {}

template <typename T>
void GenericAtoi(const string& s, T* out) {}

void safe_strto32(const string& s, int32 *n) {}

void safe_strtou64(const string& s, uint64 *n) {}

void safe_strto64(const string& s, int64* n) {}

void strrmm(string* s, const string& chars) {}

int GlobalReplaceSubstring(const string& substring,
                           const string& replacement,
                           string* s) {}

// StringHolder class
StringHolder::StringHolder(const string& s)
  :{}

StringHolder::StringHolder(const char* cp)
  :{}

StringHolder::StringHolder(uint64 n)
  :{}

StringHolder::~StringHolder() {}

// StrCat

// Implements s += sh; (s: string, sh: StringHolder)
string& operator+=(string& lhs, const StringHolder& rhs) {}

string StrCat(const StringHolder& s1, const StringHolder& s2) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9, const StringHolder& s10,
              const StringHolder& s11) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9, const StringHolder& s10,
              const StringHolder& s11, const StringHolder& s12) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9, const StringHolder& s10,
              const StringHolder& s11, const StringHolder& s12,
              const StringHolder& s13) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9, const StringHolder& s10,
              const StringHolder& s11, const StringHolder& s12,
              const StringHolder& s13, const StringHolder& s14) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9, const StringHolder& s10,
              const StringHolder& s11, const StringHolder& s12,
              const StringHolder& s13, const StringHolder& s14,
              const StringHolder& s15) {}

string StrCat(const StringHolder& s1, const StringHolder& s2,
              const StringHolder& s3, const StringHolder& s4,
              const StringHolder& s5, const StringHolder& s6,
              const StringHolder& s7, const StringHolder& s8,
              const StringHolder& s9, const StringHolder& s10,
              const StringHolder& s11, const StringHolder& s12,
              const StringHolder& s13, const StringHolder& s14,
              const StringHolder& s15, const StringHolder& s16) {}

// StrAppend

void StrAppend(string* dest, const StringHolder& s1) {}

void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2) {}

void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
               const StringHolder& s3) {}

void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
               const StringHolder& s3, const StringHolder& s4) {}

void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
               const StringHolder& s3, const StringHolder& s4,
               const StringHolder& s5) {}

}  // namespace phonenumbers
}  // namespace i18n