◆ from() [1/2]
Constructs a sub-string view reference from a raw string data.
- Note
- This function does not check for the real ending of str.
- Parameters
-
| str | input raw string pointer. |
| len | number of characters in the sub-string (assumed to be within str bounds). |
| pos | position of the first character of the sub-string in str (assumed to be within str bounds). |
- Returns
- The ConstStrView object representing the sub-string of str.
◆ from() [2/2]
Constructs a sub-string view from a std::string object.
- Parameters
-
| str | input string. |
| pos | position of the first character of the sub-string in str. |
| len | number of characters of the sub-string. If len = -1, then the size is str.size() - pos. |
- Returns
- The ConstStrView object representing the sub-string of str.
◆ operator==()
| bool hermes::ConstStrView::operator== |
( |
const std::string & |
s | ) |
const |
Checks if this sub-string with the string s are equal.
- Parameters
-
- Returns
- true if both string are equal.
◆ size()
| size_t hermes::ConstStrView::size |
( |
| ) |
const |
Gets the size of the view.
- Returns
- the number of characters in the sub-string.
The documentation for this class was generated from the following files: