Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/f2564742e1c793de1cb355535b064dd6 to your computer and use it in GitHub Desktop.
Save trycf/f2564742e1c793de1cb355535b064dd6 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfset arguments.destinatarios = '101,102,doc_primaria,l_1'>
<cfset tempArray = listToArray(arguments.destinatarios)>
<cfdump var="#tempArray#">
<cfset secciones = []>
<cfset listaDist = []>
<cfloop from="1" to="#ArrayLen(tempArray)#" index="i">
<cfif Find('l_', tempArray[i])>
<cfset ArrayAppend(secciones,tempArray[i])>
<cfelse>
<cfset ArrayAppend(listaDist,Replace(tempArray[i],'l_',''))>
</cfif>
</cfloop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment