string.hpp 1.57 KB
Newer Older
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
1
2
3
4
5
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
Raphael Defosseux's avatar
Raphael Defosseux committed
6
7
8
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 *file except in compliance with the License. You may obtain a copy of the
 *License at
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * 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.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

/*! \file string.hpp
 \brief
 \author  Lionel GAUTHIER
 \date 2018
 \email: lionel.gauthier@eurecom.fr
 */
#ifndef FILE_STRING_HPP_FILE_SEEN
#define FILE_STRING_HPP_FILE_SEEN

#include <string>

namespace util {

Raphael Defosseux's avatar
Raphael Defosseux committed
35
std::string string_format(const char* format, ...);
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
36

Raphael Defosseux's avatar
Raphael Defosseux committed
37
std::string& ltrim(std::string& s);
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
38
// trim from end
Raphael Defosseux's avatar
Raphael Defosseux committed
39
std::string& rtrim(std::string& s);
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
40
// trim from both ends
Raphael Defosseux's avatar
Raphael Defosseux committed
41
std::string& trim(std::string& s);
Rohan's avatar
Rohan committed
42
// extract query param from given querystring
Rohan's avatar
Rohan committed
43
std::string get_query_param(std::string querystring, std::string param);
Raphael Defosseux's avatar
Raphael Defosseux committed
44
}  // namespace util
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
45
#endif