What does your feature request improve on? Please describe.
Often it is necessary to access the very first or very last character of a string. Using STR.at() is tedious here.
Describe the solution you'd like
Create two new methods STR.front and STR.back to access the very first and very last character in the corresponding string.
Additional context
Add any other context or screenshots about the feature request here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
This requires inserting the logic in void replaceStringMethod(string& sLine, size_t nPos, size_t nLength, const string& sReplacement) similar to STRVAR.len. To achieve this, create the corresponding stringfunctions to redirect the logic. Name those functions firstch(STR) and lastch(STR) and the methods also possibly STR.first and STR.last.
Keep in mind that the current string might be empty (then return an empty string). Add also the necessary documentation.
DESCRIPTION
What does your feature request improve on? Please describe. Often it is necessary to access the very first or very last character of a string. Using
STR.at()
is tedious here.Describe the solution you'd like Create two new methods
STR.front
andSTR.back
to access the very first and very last character in the corresponding string.Additional context Add any other context or screenshots about the feature request here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
This requires inserting the logic in
void replaceStringMethod(string& sLine, size_t nPos, size_t nLength, const string& sReplacement)
similar toSTRVAR.len
. To achieve this, create the corresponding stringfunctions to redirect the logic. Name those functionsfirstch(STR)
andlastch(STR)
and the methods also possiblySTR.first
andSTR.last
.Keep in mind that the current string might be empty (then return an empty string). Add also the necessary documentation.
IMPLEMENTATION STEPS
(see also our Wiki for implementation guidelines)
DOCUMENTATION STEPS
(see also our Wiki for further information)
*.NHLP
and*.NDB
files, if needed)*.NLNG
files, if needed)PULL REQUEST