Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: trunk/src/tools/gn/string_utils.h

Issue 21084010: Revert 214254 "Add initial prototype for the GN meta-buildsystem." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/tools/gn/standard_out.cc ('k') | trunk/src/tools/gn/string_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/tools/gn/string_utils.h
===================================================================
--- trunk/src/tools/gn/string_utils.h (revision 214322)
+++ trunk/src/tools/gn/string_utils.h (working copy)
@@ -1,51 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TOOLS_GN_STRING_UTILS_H_
-#define TOOLS_GN_STRING_UTILS_H_
-
-#include "base/strings/string_piece.h"
-
-class Err;
-class Scope;
-class Token;
-class Value;
-
-inline std::string operator+(const std::string& a, const base::StringPiece& b) {
- std::string ret;
- ret.reserve(a.size() + b.size());
- ret.assign(a);
- ret.append(b.data(), b.size());
- return ret;
-}
-
-inline std::string operator+(const base::StringPiece& a, const std::string& b) {
- std::string ret;
- ret.reserve(a.size() + b.size());
- ret.assign(a.data(), a.size());
- ret.append(b);
- return ret;
-}
-
-// Unescapes and expands variables in the given literal, writing the result
-// to the given value. On error, sets |err| and returns false.
-bool ExpandStringLiteral(Scope* scope,
- const Token& literal,
- Value* result,
- Err* err);
-
-// Removes the given prefix from the string. Asserts if the string does
-// not have the given prefix.
-//
-// Note: could potentially return a StringPiece into the str.
-std::string RemovePrefix(const std::string& str, const std::string& prefix);
-
-// Appends the given string piece to the given string. This avoids an
-// intermediate copy.
-inline void AppendStringPiece(std::string* dest,
- const base::StringPiece& piece) {
- dest->append(piece.data(), piece.size());
-}
-
-#endif // TOOLS_GN_STRING_UTILS_H_
« no previous file with comments | « trunk/src/tools/gn/standard_out.cc ('k') | trunk/src/tools/gn/string_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698