[sr-dev] git:master:df1f22fc: textops: docs for str_find() and str_ifind()

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 30 09:26:16 CEST 2021


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-03-30T09:25:36+02:00

textops: docs for str_find() and str_ifind()

---

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

---

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

---

diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml
index c41859f731..6f3ab09f9a 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -1760,6 +1760,52 @@ if (ends_with("$rU", "8800"))
 		</example>
 	</section>
 
+	<section id="textops.f.str_find">
+		<title>
+		<function moreinfo="none">str_find(str1, str2)</function>
+		</title>
+		<para>
+			The function returns <emphasis>true</emphasis> (greater than 0) if
+			the str2 string is found in str1, case sensitive comparison.
+		</para>
+		<para>
+		This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>str_find</function> usage</title>
+		<programlisting format="linespecific">
+...
+if (str_find("$rU", "8800")) {
+    # do interesting stuff here
+}
+...
+</programlisting>
+		</example>
+	</section>
+
+	<section id="textops.f.str_ifind">
+		<title>
+		<function moreinfo="none">str_ifind(str1, str2)</function>
+		</title>
+		<para>
+			The function returns <emphasis>true</emphasis> (greater than 0) if
+			the str2 string is found in str1, case insensitive comparison.
+		</para>
+		<para>
+		This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>str_ifind</function> usage</title>
+		<programlisting format="linespecific">
+...
+if (str_ifind("$rU", "Alice")) {
+    # 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