Loop through list within a Groovy multi line string

Posted by UltraVi01 on Stack Overflow See other posts from Stack Overflow or by UltraVi01
Published on 2010-06-02T04:16:55Z Indexed on 2010/06/02 4:23 UTC
Read the original article Hit count: 196

Filed under:

I am trying to create a multi line string in Groovy. I have a list of strings that I'd like to loop through within the multi line string. I am not sure what the syntax is for this. Something like below...

    def html = """\
       <ul>
          <li>$awaiting.each { it.toPermalink()}</li>
       </ul>
     """

© Stack Overflow or respective owner

Related posts about groovy