Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 23/09/2021 07:46:23
Showing 1 changed files
... ...
@@ -39,6 +39,8 @@ Daniel-Constantin Mierla
39 39
               4.7. pos_body_end()
40 40
               4.8. pos_find_str(idx, val)
41 41
               4.9. pos_findi_str(idx, val)
42
+              4.10. pos_rfind_str(idx, val)
43
+              4.11. pos_rfindi_str(idx, val)
42 44
 
43 45
    List of Examples
44 46
 
... ...
@@ -52,6 +54,8 @@ Daniel-Constantin Mierla
52 54
    1.8. pos_body_end() usage
53 55
    1.9. pos_find_str() usage
54 56
    1.10. pos_findi_str() usage
57
+   1.11. pos_find_str() usage
58
+   1.12. pos_rfindi_str() usage
55 59
 
56 60
 Chapter 1. Admin Guide
57 61
 
... ...
@@ -78,6 +82,8 @@ Chapter 1. Admin Guide
78 82
         4.7. pos_body_end()
79 83
         4.8. pos_find_str(idx, val)
80 84
         4.9. pos_findi_str(idx, val)
85
+        4.10. pos_rfind_str(idx, val)
86
+        4.11. pos_rfindi_str(idx, val)
81 87
 
82 88
 1. Overview
83 89
 
... ...
@@ -132,6 +138,8 @@ modparam("posops", "idx0", -200)
132 138
    4.7. pos_body_end()
133 139
    4.8. pos_find_str(idx, val)
134 140
    4.9. pos_findi_str(idx, val)
141
+   4.10. pos_rfind_str(idx, val)
142
+   4.11. pos_rfindi_str(idx, val)
135 143
 
136 144
 4.1.  pos_append(idx, val)
137 145
 
... ...
@@ -236,7 +244,9 @@ $var(pos) = pos_body_end();
236 244
    case of not finding it or error, the return code is negative. If val is
237 245
    at index 0, it returns the value specified by modparam idx0.
238 246
 
239
-   The idx can be an integer value or a variable holding an integer.
247
+   The idx can be an integer value or a variable holding an integer. If
248
+   the value is negative, the position is counted from the end of the
249
+   buffer.
240 250
 
241 251
    The val can be a static string or variables.
242 252
 
... ...
@@ -254,7 +264,9 @@ $var(idx) = pos_find_str("100", "kamailio");
254 264
    code is negative. If val is at index 0, it returns the value specified
255 265
    by modparam idx0.
256 266
 
257
-   The idx can be an integer value or a variable holding an integer.
267
+   The idx can be an integer value or a variable holding an integer. If
268
+   the value is negative, the position is counted from the end of the
269
+   buffer.
258 270
 
259 271
    The val can be a static string or variables.
260 272
 
... ...
@@ -264,3 +276,43 @@ $var(idx) = pos_find_str("100", "kamailio");
264 276
 ...
265 277
 $var(idx) = pos_findi_str("100", "kamailio");
266 278
 ...
279
+
280
+4.10.  pos_rfind_str(idx, val)
281
+
282
+   Return the last position of the val in message buffer starting at idx
283
+   (reverse search). In case of not finding it or error, the return code
284
+   is negative. If val is at index 0, it returns the value specified by
285
+   modparam idx0.
286
+
287
+   The idx can be an integer value or a variable holding an integer. If
288
+   the value is negative, the position is counted from the end of the
289
+   buffer.
290
+
291
+   The val can be a static string or variables.
292
+
293
+   This function can be used from ANY_ROUTE.
294
+
295
+   Example 1.11. pos_find_str() usage
296
+...
297
+$var(idx) = pos_rfind_str("100", "kamailio");
298
+...
299
+
300
+4.11.  pos_rfindi_str(idx, val)
301
+
302
+   Return the last position of the val (matching case insensitive) in
303
+   message buffer starting at idx (reverse search). In case of not finding
304
+   it or error, the return code is negative. If val is at index 0, it
305
+   returns the value specified by modparam idx0.
306
+
307
+   The idx can be an integer value or a variable holding an integer. If
308
+   the value is negative, the position is counted from the end of the
309
+   buffer.
310
+
311
+   The val can be a static string or variables.
312
+
313
+   This function can be used from ANY_ROUTE.
314
+
315
+   Example 1.12. pos_rfindi_str() usage
316
+...
317
+$var(idx) = pos_rfindi_str("100", "kamailio");
318
+...