بسم الله الرحمن الرحيم
السلام عليكم،
عندي مشكلة :( وهي: عندما استخرج كلمه كلمه من ملف يضاف النو لين (سطر جديد) للكلمه.
مثلا: عندي ملف:
This is just a test
this is the second line
third
وهذا الكود
foreach(char chr in character)
{
if((chr!= ' ') && (chr != '\n'))
word += chr;
else
{
this.textBox1.AppendText(word);
this.textBox1.AppendText(System.Convert.ToString(word.Length));
this.textBox1.AppendText("\n");
word = null;
}//end else
}//end for
فيكون الـoutput كالتالي:
This4
is2
just4
a1
test5
this4
is2
the3
second6
line5
third6
الكلمات الذي بالاحمر بيطلع ارقام عير صحيحه للـlength مع اني حددت ما يحسب الـ space ولا الـ new line :angry:
ايش الحل؟؟
وشكراً
-waf