public static IdString createIdString(String id) {
        if (id.length() > MAX_LENGTH) {
            throw new IllegalArgumentException("Document id length " + id.length() + " is longer than max length of " + MAX_LENGTH);
        }
        validateTextString(id);
        return parseAndCreate(id);
    }
Creates a IdString based on the given document id string.

The document id string can only contain text characters.
document/src/main/java/com/yahoo/document/idstring/IdString.java