int (String text) { if (!text.startsWith("\"\"\"")) return -1; final int length = text.length(); for (int i = 3; i < length; i++) { final char c = text.charAt(i); if (c == '\n') return i + 1; if (!Character.isWhitespace(c)) return -1; } return -1; }