I want to split a string into char
this is my line
"stack overflow on a very good website"
and I want to convert this line
like
first word and second character division
...... t .... h .... e .... set ...... s .... t .... a .... c .... k. ... overflow ...... o .... v .... e .... r .... f .... l .... o .... w .... in ...... i .... n .... very ...... v .... e .... r .... y .... good ..... ..g .... o .... o .... d .... website ...... w .... e .... b .... s .... i .... t .... e ....
I use Natural Reader software and create spelling dictation mp3 file
this is my program
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace file { class Program { public static string fileLoc = @"C:\Users\Administrator\Desktop\sample1.txt"; public static string s; public static string data = "the Qaru in very good website"; private static void Main(string[] args) { Create_File(); Wrint_in_File(); Read_file(); add_comma(); s = Console.ReadLine(); } public static void Wrint_in_File() { if (File.Exists(fileLoc)) { using (StreamWriter sw = new StreamWriter(fileLoc)) { sw.WriteLine(DateTime.Now); sw.WriteLine(data); Console.WriteLine("Data is successfully save in File"); } } } public static void Create_File() { FileStream fs = null; if (!File.Exists(fileLoc)) { using (fs = File.Create(fileLoc)) { Console.WriteLine(@"File is Successfully Created at C:\Users\Administrator\Desktop\sample1.txt"); Console.ReadLine(); } } } public static void Read_file() { if (File.Exists(fileLoc)) { using (TextReader tr = new StreamReader(fileLoc)) { string s= tr.ReadToEnd(); Console.WriteLine(s); Console.ReadLine(); } } } public static void add_comma() { if (File.Exists(fileLoc)) { using (StreamWriter sw = new StreamWriter(fileLoc)) { sw.WriteLine(DateTime.Now); string txt =data.Replace(" ", ".. .. .. .. .. .. .. .."); sw.WriteLine(txt); Console.WriteLine(txt); } } } } }
source share