getSubstring is available before build