String methods according to JS convention