Word Count Algorithm in C#

前端 未结 7 1469
天涯浪人
天涯浪人 2021-01-05 02:37

I am looking for a good word count class or function. When I copy and paste something from the internet and compare it with my custom word count algorithm and MS Word it is

相关标签:
7条回答
  • 2021-01-05 03:25

    String.Split by predefined chars. Use punctuations, spaces (remove multiple space), and any other chars that you determine to be "word splits"

    What have you tried?

    I did see that the previous user got nailed for links, but here is some examples of using regex, or char matching. Hope it helps, and nobody gets hurt X-)

    String.Split Method (Char[])

    Word counter in C#

    C# Word Count

    0 讨论(0)
提交回复
热议问题