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

Side by Side Diff: tools/gn/string_utils.h

Issue 1483343004: tools/gn: remove three unused functions from string_utils.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/string_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_STRING_UTILS_H_ 5 #ifndef TOOLS_GN_STRING_UTILS_H_
6 #define TOOLS_GN_STRING_UTILS_H_ 6 #define TOOLS_GN_STRING_UTILS_H_
7 7
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 9
10 class Err; 10 class Err;
(...skipping 17 matching lines...) Expand all
28 return ret; 28 return ret;
29 } 29 }
30 30
31 // Unescapes and expands variables in the given literal, writing the result 31 // Unescapes and expands variables in the given literal, writing the result
32 // to the given value. On error, sets |err| and returns false. 32 // to the given value. On error, sets |err| and returns false.
33 bool ExpandStringLiteral(Scope* scope, 33 bool ExpandStringLiteral(Scope* scope,
34 const Token& literal, 34 const Token& literal,
35 Value* result, 35 Value* result,
36 Err* err); 36 Err* err);
37 37
38 // Removes the given prefix from the string. Asserts if the string does
39 // not have the given prefix.
40 //
41 // Note: could potentially return a StringPiece into the str.
42 std::string RemovePrefix(const std::string& str, const std::string& prefix);
tfarina 2015/12/01 19:53:44 I found this because I was interested on RemovePre
43
44 // Appends the given string piece to the given string. This avoids an
45 // intermediate copy.
46 inline void AppendStringPiece(std::string* dest,
47 const base::StringPiece& piece) {
48 dest->append(piece.data(), piece.size());
49 }
50
51 // Removes the trailing slash from the given string. This asserts that either
52 // the string is empty or it ends with a slash (normally used to process
53 // directories).
54 void TrimTrailingSlash(std::string* str);
55
56 #endif // TOOLS_GN_STRING_UTILS_H_ 38 #endif // TOOLS_GN_STRING_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | tools/gn/string_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698