Standard LibraryTypesstringMethodssubstrOn this pagesubstr Method of string. substr(integer pos, integer len) -> string Returns a substring starting at the specified position with the specified length. Parameters pos: The starting position of the substring. len: The length of the substring.