String (@NotNull String text) { int len = text.length(); if (len > 0) { int from = isQuoteAt(text, 0) ? 1 : 0; int to = len > 1 && isQuoteAt(text, len - 1) ? len - 1 : len; if (from > 0 || to < len) { return text.substring(from, to); } } return text; }