We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 182543f commit 1af3757Copy full SHA for 1af3757
1 file changed
source/code2text/src/main.rs
@@ -119,6 +119,21 @@ fn parse_args() -> Arguments {
119
}
120
121
122
+fn remove_chars(input: String) -> String {
123
+ let mut new_value = String::new();
124
+ for i in input.chars() {
125
+ match i {
126
+ '\'' | '\"' | '.' => {
127
+ continue;
128
+ }
129
+ _=> {
130
+ new_value.push(i);
131
132
133
134
+ new_value
135
+}
136
+
137
fn gen_words(
138
input: &str,
139
num: usize,
@@ -134,7 +149,7 @@ fn gen_words(
149
for line in r.lines() {
150
match line {
151
Ok(l) => {
- lines.push(l);
152
+ lines.push(remove_chars(l));
153
154
Err(e) => {
140
155
eprintln!("Error: {}", e);
0 commit comments