I am creating a program where there is 1 text box and only 1 text box where the user inputs their full name. (ex. George Bean Banana) and when you click the initialize button the display is ( G. B. B.). So far I have it so it will Display ( G. ) but I can not figure out how to get the beginning of the second word in the box and the beginning of the third word in the box.
I was thinking that I would use the strName.indexOf(" ") somehow to find where the spaces are then just +1 to the location and display whats after the space. But I am not to sure on how I would go about using that? Any ideas would be greatly appreciated. Thank You.
I was thinking that I would use the strName.indexOf(" ") somehow to find where the spaces are then just +1 to the location and display whats after the space. But I am not to sure on how I would go about using that? Any ideas would be greatly appreciated. Thank You.
Last edited: