What does your feature request improve on? Please describe.
Often it is necessary to detect, whether a string begins or ends with a specific substring. Although this can be done using substr() == STR, it is error prone if comparing the last characters of a string.
Describe the solution you'd like
Provide two new functions beginswith(STR,STR) -> LOG and endswith(STR,STR) -> LOG, which shall detect, whether a stirng starts or ends with a corresponding string. Naming is up to discussion, of course.
Additional context
Add any other context or screenshots about the feature request here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
Create the two function implementations in stringfunctions.hpp as STR_STR. As it is quite common to name the function for comparing the beginning of the string startswith(), we'll use this name as well.
DESCRIPTION
What does your feature request improve on? Please describe. Often it is necessary to detect, whether a string begins or ends with a specific substring. Although this can be done using
substr() == STR
, it is error prone if comparing the last characters of a string.Describe the solution you'd like Provide two new functions
beginswith(STR,STR) -> LOG
andendswith(STR,STR) -> LOG
, which shall detect, whether a stirng starts or ends with a corresponding string. Naming is up to discussion, of course.Additional context Add any other context or screenshots about the feature request here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
Create the two function implementations in
stringfunctions.hpp
asSTR_STR
. As it is quite common to name the function for comparing the beginning of the stringstartswith()
, we'll use this name as well.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