blob: 697a34230e5873e823c7cad421bdf27a70483426 [file] [log] [blame]
Gary Morrisonced8c6f2020-02-27 19:35:59 +00001/*
2 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef STRING_OPS_HPP
9#define STRING_OPS_HPP
10
11#include <cstddef>
12#include <string>
13
14using namespace std;
15
16// Replace first occurrence of find_str within orig of replace_str:
17size_t find_replace_1st (const string &find_str, const string &replace_str,
18 string &orig);
19
20// Replace all occurrences of find_str in "this" string, with replace_str:
21size_t find_replace_all (const string &find_str, const string &replace_str,
22 string &orig);
23
24/* In both of the above string-replacement functions, the return value is start
25 offset to the (last) occurrence of "find_str" within "orig." */
26
27#endif // #ifndef STRING_OPS_HPP