计算vb.net中richtextbox中的单词 [英] Count words in richtextbox in vb.net
本文介绍了计算vb.net中richtextbox中的单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在richtextbox中计算单词。
尝试这个解决方案,但在输入密钥后无效:
I want to count words in richtextbox live.
Tried this solution but not work after enter key:
Dim w As String() = RichTextBox1.Text.Split(" ".ToCharArray())
label1.Text = " Words :- " & w.Length.ToString()
推荐答案
您需要解析文本才能实现此目的。这篇文章将有所帮助:解析句子和构建文本静态Visual Basic [ ^ ]
You need to parse the text in order to achieve this. Here's an article that will help: Parsing Sentences and Building Text Statics in Visual Basic[^]
这篇关于计算vb.net中richtextbox中的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文