[Solved] How to split a string after a certain length? But it should be divided after word completion
[ad_1] Here is one simple way to do it. It presumes that a space separates words. It works as follows: find the index of the first space starting at the desired length of the string. if the return value is -1 (no space found), use the string length. get the substring from 0 to that … Read more