How to split a string into words. Ex: “stringintowords” -> “String Into Words”?

前端 未结 13 1215
粉色の甜心
粉色の甜心 2020-11-29 20:18

What is the right way to split a string into words ? (string doesn\'t contain any spaces or punctuation marks)

For example: \"stringintowords\" -> \"String Into Word

13条回答
  •  一向
    一向 (楼主)
    2020-11-29 20:28

    If you want to ensure that you get this right, you'll have to use a dictionary based approach and it'll be horrendously inefficient. You'll also have to expect to receive multiple results from your algorithm.

    For example: windowsteamblog (of http://windowsteamblog.com/ fame)

    • windows team blog
    • window steam blog

提交回复
热议问题