... | ... |
@@ -1695,6 +1695,31 @@ if (starts_with("$rU", "+358")) |
1695 | 1695 |
</example> |
1696 | 1696 |
</section> |
1697 | 1697 |
|
1698 |
+ <section id="textops.f.ends_with"> |
|
1699 |
+ <title> |
|
1700 |
+ <function moreinfo="none">ends_with(str1, str2)</function> |
|
1701 |
+ </title> |
|
1702 |
+ <para> |
|
1703 |
+ The function returns <emphasis>true</emphasis> if the first string ends |
|
1704 |
+ with the second string. The parameters can contain variables. |
|
1705 |
+ </para> |
|
1706 |
+ <para> |
|
1707 |
+ This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, |
|
1708 |
+ FAILURE_ROUTE and BRANCH_ROUTE. |
|
1709 |
+ </para> |
|
1710 |
+ <example> |
|
1711 |
+ <title><function>ends_with</function> usage</title> |
|
1712 |
+ <programlisting format="linespecific"> |
|
1713 |
+... |
|
1714 |
+if (ends_with("$rU", "8800")) |
|
1715 |
+{ |
|
1716 |
+ # do interesting stuff here |
|
1717 |
+} |
|
1718 |
+... |
|
1719 |
+</programlisting> |
|
1720 |
+ </example> |
|
1721 |
+ </section> |
|
1722 |
+ |
|
1698 | 1723 |
<section id="textops.f.set_body_multipart"> |
1699 | 1724 |
<title> |
1700 | 1725 |
<function moreinfo="none">set_body_multipart([txt,content_type][,boundary])</function> |