Răsfoiți Sursa

cookbooks/devel/transformations: docs update for {s.select}

Daniel-Constantin Mierla 1 an în urmă
părinte
comite
029001bf6b
1 a modificat fișierele cu 8 adăugiri și 2 ștergeri
  1. 8 2
      docs/cookbooks/devel/transformations.md

+ 8 - 2
docs/cookbooks/devel/transformations.md

@@ -102,18 +102,24 @@ Example:
 ### {s.select,index,separator}
 
 Return a field from PV value. The field is selected based on separator
-and index. The separator must be a character used to identify the
-fields. Index must be an integer value or a PV. If index is negative, the
+and index.
+
+Index must be an integer value or a PV. If index is negative, the
 count of fields starts from end of PV value, -1 being last field. If
 index is positive, 0 is the first field.
 
+The separator must be a character used to identify the fields. It can also be
+an escaped character: `\\`, `\t`, `\n`, `\r` or `\s` (all whitespaces).
+
 Example:
 
+```
     $var(x) = "12,34,56";
     $(var(x){s.select,1,,}) => "34" ;
 
     $var(x) = "12,34,56";
     $(var(x){s.select,-2,,}) => "34"
+```
 
 ### {s.encode.7bit}