153fa529bef8371399def4e2566a40f5469addae7keghani@google.com// Copyright 2013 The Chromium Authors. All rights reserved. 253fa529bef8371399def4e2566a40f5469addae7keghani@google.com// Use of this source code is governed by a BSD-style license that can be 353fa529bef8371399def4e2566a40f5469addae7keghani@google.com// found in the LICENSE file. 453fa529bef8371399def4e2566a40f5469addae7keghani@google.com// 553fa529bef8371399def4e2566a40f5469addae7keghani@google.com// This file defines utility functions for working with strings. 653fa529bef8371399def4e2566a40f5469addae7keghani@google.com// 753fa529bef8371399def4e2566a40f5469addae7keghani@google.com// The original source code is from: 853fa529bef8371399def4e2566a40f5469addae7keghani@google.com// http://src.chromium.org/viewvc/chrome/trunk/src/base/strings/string_util.h?revision=268754 964fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com// 1064fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com// Modified to contain only DoReplaceStringPlaceholders() that works only with 1164fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com// std::string. 1253fa529bef8371399def4e2566a40f5469addae7keghani@google.com 1364fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com#ifndef I18N_ADDRESSINPUT_UTIL_STRING_UTIL_H_ 1464fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com#define I18N_ADDRESSINPUT_UTIL_STRING_UTIL_H_ 1553fa529bef8371399def4e2566a40f5469addae7keghani@google.com 1653fa529bef8371399def4e2566a40f5469addae7keghani@google.com#include <string> 1753fa529bef8371399def4e2566a40f5469addae7keghani@google.com#include <vector> 1853fa529bef8371399def4e2566a40f5469addae7keghani@google.com 1964fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.comnamespace i18n { 2064fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.comnamespace addressinput { 2153fa529bef8371399def4e2566a40f5469addae7keghani@google.com 2264fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.comstd::string DoReplaceStringPlaceholders(const std::string& format_string, 2364fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com const std::vector<std::string>& subst); 2453fa529bef8371399def4e2566a40f5469addae7keghani@google.com 2564fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com} // addressinput 2664fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com} // i18n 2753fa529bef8371399def4e2566a40f5469addae7keghani@google.com 2864fce26be7b2cd38805b2dc24d8a8ca8fe4598b1keghani@google.com#endif // I18N_ADDRESSINPUT_UTIL_STRING_UTIL_H_ 29