JAL-2541 length check in deleteChars (redoing lost commit 4a4bc78)