超过5个空格可用,然后将前一个文本存储在一个字符串中并在文本框中读取? [英] More than 5 white spaces are available then stored the previous text in one string and read in textbox?

查看:97
本文介绍了超过5个空格可用,然后将前一个文本存储在一个字符串中并在文本框中读取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Sir / Mam,
如果文件中出现超过5个空格,则
计算空格的数量,然后在文本框中打印OR文本框中的5个空格文本。

Hello Sir/Mam,
count the number of white spaces if more than 5 spaces are occur in the file then after that 5 spaces text store in OR print in text box.

推荐答案

int countSpaces = mystring.Count(Char.IsWhiteSpace); // will gives you the number of white spaces in the input string (mystring)


I Count the white spaces but I Want ..
if(countnospace > 5)
{
   display the text after that 5 spaces in a text box.
   same way check for next...
}


这篇关于超过5个空格可用,然后将前一个文本存储在一个字符串中并在文本框中读取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆