summaryrefslogtreecommitdiffhomepage
path: root/subr/rtl_string.subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr/rtl_string.subr')
-rw-r--r--subr/rtl_string.subr9
1 files changed, 9 insertions, 0 deletions
diff --git a/subr/rtl_string.subr b/subr/rtl_string.subr
index 2d529786..c30cfe8c 100644
--- a/subr/rtl_string.subr
+++ b/subr/rtl_string.subr
@@ -12,6 +12,15 @@ rtl_isnumber() {
return "${_rc}";
};
+rtl_match() {
+ local _s="${1}" _find="${2}";
+ if [ "${_s#${_find}}" != "${_s}" ]; then
+ return 0;
+ else
+ return 1;
+ fi;
+};
+
rtl_subst() {
local _s="${1}" _find="${2}" _replace="${3}" _prefix="" _s_new="";
while [ -n "${_s}" ]; do