How to parse Freemarker to separate strings and loops
This article mainly analyzes how to analyze the relevant knowledge points of Freemarker separating strings and loops, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor and learn more about "how to analyze Freemarker to separate strings and loops".
The mode of the Freemarker loop:
# sequence can be array, java.util.Collection, java.util.List, java.util.Set [# list sequence as item] ${item} to get the sequence number (starting with 0): ${item_index} ${item_index + 1} to determine whether there is a next [# if item_has_next]. There is also the next element. [/ # if] [/ # list] # cycle from 1 to 10 [# list 1.. 10 as I]... [/ # list]
The freemarker built-in method split is used to separate strings:
[# list '1pd2,') as num]... ${num}... [/ # list] on "how to analyze Freemarker delimited strings and loops", that's it. More related content can be searched for previous articles, hope to help you answer questions and questions, please support the website!