Compare commits

...

3 Commits

Author SHA1 Message Date
Oleksii Nimych
2559c2af73 fix(TDI-44093): fix processing text a single quote 2020-04-29 08:30:26 +03:00
Oleksii Nimych
e39d7ea3dc fix(TDI-44093): Refactoring to improve readability 2020-04-28 17:41:53 +03:00
Oleksii Nimych
c628e574a9 fix(TDI-44093): Add method that checks if string wrapped by quotes 2020-04-27 15:41:03 +03:00
2 changed files with 15 additions and 0 deletions

View File

@@ -281,6 +281,17 @@ public final class TalendQuoteUtils {
return text;
}
public static boolean isEnclosed(String text) {
if (text == null) {
return false;
}
text = text.trim();
if (text.length() < 2) {
return false;
}
return text.startsWith(QUOTATION_MARK) && text.endsWith(QUOTATION_MARK);
}
/**
*
* ggu Comment method "addQuotesForSQLString".

View File

@@ -477,6 +477,10 @@ public class TalendTextUtils {
return TalendQuoteUtils.removeQuotes(text, quotation);
}
public static boolean isEnclosed(String text) {
return TalendQuoteUtils.isEnclosed(text);
}
public static String getStringConnect() {
return TalendQuoteUtils.getStringConnect();
}