Replaced m.substringToIndex()