-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStringConst.h
More file actions
43 lines (24 loc) · 1.31 KB
/
StringConst.h
File metadata and controls
43 lines (24 loc) · 1.31 KB
1
2
3
4
5
6
7
8
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
35
36
37
38
39
40
41
42
43
#pragma once
#include <string>
// 'StrConst' - String-Const, all methods are const.
struct StrConst
{
constexpr static std::string_view struct_ = "StrConst";
std::string reverseString() const;
std::string reverseString(const char* pStr) const;
std::string reverseString(std::string pStr) const; // (1) by value
std::string reverseString(std::string& pStr) const; // (2) lvalue ref
std::string reverseString(const std::string& pStr) const; // (3) const lvalue ref
std::string reverseString(std::string&& pStr) const; // (4) rvalue ref
std::string reverseString(std::string* pStr) const; // (5) pointer
std::string reverseString(const std::string* pStr) const; // (6) pointer to const
std::string revStrConstRefArg(const std::string_view& pStr) const;
std::string revStrNonConstRefArg(std::string_view& pStr) const;
std::string revStrRValueRefArg(std::string_view&& pStr) const;
std::string revStrOverloadValRef(std::string_view pStr) const;
std::string revStrOverloadValRef(std::string_view& pStr) const;
std::string revStrOverloadValCRef(std::string_view pStr) const;
std::string revStrOverloadValCRef(const std::string_view& pStr) const;
std::string revStrOverloadRefAndCRef(std::string_view& pStr) const;
std::string revStrOverloadRefAndCRef(const std::string_view& pStr) const;
};