Mulesoft 3 DataWeave - split a string by an arbitrary length
问题 In Mule 3 DataWeave, how do I split a long string into multiple lines by a set length? For instance, I have the following JSON input: { "id" : "123", "text" : "There is no strife, no prejudice, no national conflict in outer space as yet. Its hazards are hostile to us all. Its conquest deserves the best of all mankind, and its opportunity for peaceful cooperation many never come again." } The input system can only accept strings of 40 characters or less, so the output XML needs to conform as