Get the App
SLTechnology News&Howtos  ›  Development  › 

How to parse Freemarker to separate strings and loops

Shulou Source: shulou.com Published: 2022-06-02 01:29:40 10月04日 Update

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!

Tags: Loops characters strings analysis content knowledge followers values elements interests serial numbers arrays articles methods methods understandability more knowledge points questions and answers articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Microsoft Shulou Technology macOS Shulou Tech Info