久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='l7NXw'></bdo><ul id='l7NXw'></ul>
  • <small id='l7NXw'></small><noframes id='l7NXw'>

  • <tfoot id='l7NXw'></tfoot>

  • <i id='l7NXw'><tr id='l7NXw'><dt id='l7NXw'><q id='l7NXw'><span id='l7NXw'><b id='l7NXw'><form id='l7NXw'><ins id='l7NXw'></ins><ul id='l7NXw'></ul><sub id='l7NXw'></sub></form><legend id='l7NXw'></legend><bdo id='l7NXw'><pre id='l7NXw'><center id='l7NXw'></center></pre></bdo></b><th id='l7NXw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='l7NXw'><tfoot id='l7NXw'></tfoot><dl id='l7NXw'><fieldset id='l7NXw'></fieldset></dl></div>

    <legend id='l7NXw'><style id='l7NXw'><dir id='l7NXw'><q id='l7NXw'></q></dir></style></legend>

        C# 讀取包含由制表符分隔的數(shù)據(jù)的文本文件

        C# Read Text File Containing Data Delimited By Tabs(C# 讀取包含由制表符分隔的數(shù)據(jù)的文本文件)

          <legend id='zyCIh'><style id='zyCIh'><dir id='zyCIh'><q id='zyCIh'></q></dir></style></legend>
            <bdo id='zyCIh'></bdo><ul id='zyCIh'></ul>
            <tfoot id='zyCIh'></tfoot>
            • <i id='zyCIh'><tr id='zyCIh'><dt id='zyCIh'><q id='zyCIh'><span id='zyCIh'><b id='zyCIh'><form id='zyCIh'><ins id='zyCIh'></ins><ul id='zyCIh'></ul><sub id='zyCIh'></sub></form><legend id='zyCIh'></legend><bdo id='zyCIh'><pre id='zyCIh'><center id='zyCIh'></center></pre></bdo></b><th id='zyCIh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zyCIh'><tfoot id='zyCIh'></tfoot><dl id='zyCIh'><fieldset id='zyCIh'></fieldset></dl></div>

                  <tbody id='zyCIh'></tbody>

              • <small id='zyCIh'></small><noframes id='zyCIh'>

                1. 本文介紹了C# 讀取包含由制表符分隔的數(shù)據(jù)的文本文件的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我有一些代碼:

                   public static void ReadTextFile()
                      {
                          string line;
                  
                          // Read the file and display it line by line.
                          using (StreamReader file = new StreamReader(@"C:Documents and SettingsAdministratorDesktopsnpprivatesellerlist.txt"))
                          {
                              while ((line = file.ReadLine()) != null)
                              {
                  
                                  char[] delimiters = new char[] { '	' };
                                  string[] parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
                                  for (int i = 0; i < parts.Length; i++)
                                  {
                  
                                       Console.WriteLine(parts[i]);
                                       sepList.Add(parts[i]);
                  
                                  }
                  
                              }
                  
                              file.Close();
                          }
                          // Suspend the screen.
                          Console.ReadLine();     
                      }
                  

                  它讀入一個(gè)包含由制表符分隔的數(shù)據(jù)的文本文件,并將數(shù)據(jù)拆分為單獨(dú)的單詞.

                  It reads in a text file that contains data delimited by tabs and splits the data into separate words.

                  我遇到的問(wèn)題是,一旦數(shù)據(jù)被分離,列表中隨機(jī)字符串的左右兩側(cè)仍然有大量空白(事實(shí)上大多數(shù)都有).我無(wú)法修剪字符串,因?yàn)樗粫?huì)刪除空格,從技術(shù)上講,這不是空格.

                  The problem I have is that once the data has been separated, it still has massive amounts of white space on the left and right sides on random strings in the list (Infact most of them do). I can't trim the string because it only removes white space, and technically this isn't white space.

                  任何人對(duì)如何解決這個(gè)問(wèn)題有任何想法!?

                  Anyone got any ideas on how to get round this problem!?

                  推薦答案

                  我遇到的問(wèn)題是,一旦數(shù)據(jù)被分離,列表中隨機(jī)字符串的左右兩側(cè)仍然有大量空白(事實(shí)上大多數(shù)都有).我無(wú)法修剪字符串,因?yàn)樗粫?huì)刪除空格,從技術(shù)上講,這不是空格.

                  The problem I have is that once the data has been separated, it still has massive amounts of white space on the left and right sides on random strings in the list (Infact most of them do). I can't trim the string because it only removes white space, and technically this isn't white space.

                  聽起來(lái)你的字符串中有非制表符空白字符,并且是制表符分隔的.

                  It sounds like you have non-tab whitespace characters in your string, as well as being tab delimited.

                  使用 String.Trim 應(yīng)該可以很好地刪除這些多余的字符.如果由于某種原因,對(duì)每個(gè)單詞執(zhí)行 String.Trim 不起作用,您需要切換以找出額外的字符"是由什么組成的,并使用這個(gè) String.Trim 的重載.

                  Using String.Trim should work fine to remove these extra characters. If, for some reason, doing String.Trim on each word is not working, you'll need to switch to find out what the extra "characters" are comprised of, and using this overload of String.Trim.

                  這篇關(guān)于C# 讀取包含由制表符分隔的數(shù)據(jù)的文本文件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運(yùn)行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                    <bdo id='UaDYG'></bdo><ul id='UaDYG'></ul>

                      <legend id='UaDYG'><style id='UaDYG'><dir id='UaDYG'><q id='UaDYG'></q></dir></style></legend>

                        • <i id='UaDYG'><tr id='UaDYG'><dt id='UaDYG'><q id='UaDYG'><span id='UaDYG'><b id='UaDYG'><form id='UaDYG'><ins id='UaDYG'></ins><ul id='UaDYG'></ul><sub id='UaDYG'></sub></form><legend id='UaDYG'></legend><bdo id='UaDYG'><pre id='UaDYG'><center id='UaDYG'></center></pre></bdo></b><th id='UaDYG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='UaDYG'><tfoot id='UaDYG'></tfoot><dl id='UaDYG'><fieldset id='UaDYG'></fieldset></dl></div>

                          <small id='UaDYG'></small><noframes id='UaDYG'>

                            <tbody id='UaDYG'></tbody>
                        • <tfoot id='UaDYG'></tfoot>
                            主站蜘蛛池模板: 热99视频| 欧美一级大片 | 中文字幕第十一页 | 国产精品视频偷伦精品视频 | 精品视频在线播放 | 日韩一区二区在线视频 | 91p在线观看 | 一区二区三区四区五区在线视频 | 亚洲免费精品一区 | 国产精品精品视频一区二区三区 | 亚洲欧洲成人 | 99在线视频观看 | 久久精品在线免费视频 | 久久一级免费视频 | 欧美一区二区在线观看 | 久操av在线| 久久久久久高潮国产精品视 | 久久久久9999 | 超碰人人91 | 韩日精品在线观看 | 色婷婷av一区二区三区软件 | 日韩精品一区二区三区高清免费 | 中文字幕成人免费视频 | 日韩手机在线看片 | 日韩中文字幕久久 | av资源网站 | 亚洲一区不卡 | 亚洲黄色一级 | 久久av一区二区三区 | 97av视频在线 | 久久综合一区 | 二区三区在线观看 | 在线免费中文字幕 | 福利一区在线观看 | 精品一区二区三区在线观看国产 | 精品一二三区 | 欧美一区二区三区在线观看 | 日日想夜夜操 | 午夜影院在线观看视频 | 欧美日产国产成人免费图片 | 韩国av一区二区 |