Modifs 0501241702

This commit is contained in:
2024-01-05 17:02:33 +01:00
parent 7acf529870
commit aaf8fc5bb6
3 changed files with 36 additions and 25 deletions

View File

@@ -6,4 +6,22 @@
<#return (datetimeUTC)>
</#function>
<#-- --------------------------------------------------------------------------------------- -->
<#-- Split email reflex into json array string -->
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
<#-- ${splitEmailsIntoArray(emailReflex)} -->
<#-- --------------------------------------------------------------------------------------- -->
<#function splitEmailsIntoArray emails >
<#local str = "[">
<#list emails?split(';|,| ',"r")?filter(l -> l != "") as email>
<#if str != "[">
<#local str += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#list>
<#local str += "]">
<#return (str)>
</#function>