Find a complete word in a string java

前端 未结 9 2193
伪装坚强ぢ
伪装坚强ぢ 2021-01-16 06:52

I am writing a piece of code in which i have to find only complete words for example if i have

String str = \"today is tuesday\";

and I\'m

9条回答
  •  青春惊慌失措
    2021-01-16 07:10

    I would recommend you use the "split" functionality for String with spaces as separators, then go through these elements one by one and make a direct comparison.

提交回复
热议问题