Created
May 22, 2019 08:10
-
-
Save robert-werner/e131e019af757f0b3520ff0782db3014 to your computer and use it in GitHub Desktop.
Labs and FSM vars to Honeti keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.IO; | |
| using System.Text.RegularExpressions; | |
| namespace ConsoleApp1 | |
| { | |
| class Program | |
| { | |
| private static List<string> LabList; | |
| static void Main(string[] args) | |
| { | |
| StreamWriter sw = new StreamWriter(@"C:\tools\next2.txt"); | |
| LabList = LabListMethod(@"C:\tools\exto.txt"); | |
| foreach(var lab in LabList) | |
| { | |
| sw.WriteLine(lab); | |
| } | |
| } | |
| static List<string> LabListMethod(string path) | |
| { | |
| string line; | |
| StreamReader stream = new StreamReader(path); | |
| List<string> str = new List<string>(); | |
| while ((line = stream.ReadLine()) != null) | |
| { | |
| line = line.ToLower(); | |
| line = "^" + line; | |
| line = Regex.Replace(line, @"\t", "-"); | |
| str.Add(line); | |
| } | |
| return str; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment