Custom substring method overloaded