Fixed whitespace bug

This commit is contained in:
2022-02-17 21:38:40 +00:00
parent e422f8fafe
commit 3cc99c83c8

View File

@@ -1,7 +1,7 @@
//CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/combination/ADFGVX.java //CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/combination/ADFGVX.java
//Mattrixwv //Mattrixwv
// Created: 01-26-22 // Created: 01-26-22
//Modified: 01-26-22 //Modified: 02-17-22
package com.mattrixwv.CipherStreamJava.combination; package com.mattrixwv.CipherStreamJava.combination;
@@ -36,7 +36,7 @@ public class ADFGVX{
//Remove any whitespace if selected //Remove any whitespace if selected
if(!preserveWhitespace){ if(!preserveWhitespace){
inputString = inputString.replaceAll("\\s+", ""); inputString = inputString.replaceAll("\\s", "");
} }
//Remove any symbols if selected //Remove any symbols if selected
@@ -167,7 +167,7 @@ public class ADFGVX{
inputString = inputString.toUpperCase(); inputString = inputString.toUpperCase();
} }
if(!preserveWhitespace){ if(!preserveWhitespace){
inputString = inputString.replaceAll("\\s+", ""); inputString = inputString.replaceAll("\\s", "");
} }
if(!preserveSymbols){ if(!preserveSymbols){
inputString = inputString.replaceAll("[^a-zA-Z\\s]", ""); inputString = inputString.replaceAll("[^a-zA-Z\\s]", "");