package com.codegym.task.task22.task2203;
/*
Between tabs
*/
public class Solution {
public static String getPartOfString(String string) throws StringTooShortException {
if(string == null) throw new StringTooShortException();
if(string.indexOf("\\t")<0) throw new StringTooShortException();
String[] strArray = string.split("\\t");
String result = strArray[0];
return result;
}
public static class StringTooShortException extends Exception {
}
public static void main(String[] args) throws StringTooShortException {
System.out.println(getPartOfString("\tCodeGym is the best place \tto learn Java\t."));
}
}