Browse code

textopsx: docs for hf_iterator_append()

Daniel-Constantin Mierla authored on 26/07/2021 15:15:38
Showing 1 changed files
... ...
@@ -589,6 +589,35 @@ hf_iterator_end("i1");
589 589
     }
590 590
     hf_iterator_end("i1");
591 591
 ...
592
+</programlisting>
593
+		</example>
594
+	</section>
595
+	<section id="textopsx.f.hf_iterator_append">
596
+		<title>
597
+		<function moreinfo="none">hf_iterator_append(iname, htext)</function>
598
+		</title>
599
+		<para>
600
+			Add headers after the one at the current iterator possition.
601
+		</para>
602
+		<para>
603
+			The parameters can be dynamic strings with variables.
604
+		</para>
605
+		<para>
606
+			This function can be used from ANY_ROUTE.
607
+		</para>
608
+		<example>
609
+		<title><function>hf_iterator_append</function> usage</title>
610
+		<programlisting format="linespecific">
611
+...
612
+    hf_iterator_start("i1");
613
+    while(hf_iterator_next("i1")) {
614
+        if($hfitname(i1)=="My-Header") {
615
+            hf_iterator_append("i1", "My-New-Header: abc\r\n");
616
+            break;
617
+        }
618
+    }
619
+    hf_iterator_end("i1");
620
+...
592 621
 </programlisting>
593 622
 		</example>
594 623
 	</section>