Let’s say I have the array ['dcab', 'feac', 'gwad', 'dnae'] but want to make it so that each 'a' is in its own token, eg ['dc', 'a', 'b', 'fe', 'a', 'c', 'gw', 'a', 'd', 'dn', 'a', 'e'];. How would I do that? Thanks!
Let’s say I have the array [‘dcab’, ‘feac’, ‘gwad’, ‘dnae’] but want to make
Share
Only works if each string contains exactly one or zero ‘a’ characters. You could iterate through the result of split if it could contain more.