[sr-dev] git:master:9629dbce: textops: docs for ends_with() function

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 7 09:03:28 CET 2021


Module: kamailio
Branch: master
Commit: 9629dbce67bc3f1528a055eaa4ed221bc4d00060
URL: https://github.com/kamailio/kamailio/commit/9629dbce67bc3f1528a055eaa4ed221bc4d00060

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-01-06T15:34:02+01:00

textops: docs for ends_with() function

---

Modified: src/modules/textops/doc/textops_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/9629dbce67bc3f1528a055eaa4ed221bc4d00060.diff
Patch: https://github.com/kamailio/kamailio/commit/9629dbce67bc3f1528a055eaa4ed221bc4d00060.patch

---

diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml
index 44540841d4..e9acba3869 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -1695,6 +1695,31 @@ if (starts_with("$rU", "+358"))
 		</example>
 	</section>
 
+	<section id="textops.f.ends_with">
+		<title>
+		<function moreinfo="none">ends_with(str1, str2)</function>
+		</title>
+		<para>
+		The function returns <emphasis>true</emphasis> if the first string ends
+		with the second string. The parameters can contain variables.
+		</para>
+		<para>
+		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
+		FAILURE_ROUTE and BRANCH_ROUTE.
+		</para>
+		<example>
+		<title><function>ends_with</function> usage</title>
+		<programlisting format="linespecific">
+...
+if (ends_with("$rU", "8800"))
+{
+    # do interesting stuff here
+}
+...
+</programlisting>
+		</example>
+	</section>
+
 	<section id="textops.f.set_body_multipart">
 		<title>
 		<function moreinfo="none">set_body_multipart([txt,content_type][,boundary])</function>




More information about the sr-dev mailing list