How is this code working? Can you break it down to me. Most Importantly this code gives line break at space and not in middle of letters. I couldn’t figure out how this code is working.
txt = value;
if (thisComp.layer("Text Layer").text.sourceText.length >= 61){
for (i = 61; i > 0; i--) if (txt[i] == " ") break;
if (i > 0)
txt.substr(0,i) + "\r" + txt.substr(i+1)
else
txt.substring(0,61) + "\r" + txt.substring(62,999);
}else{
txt
}