Class NameParser


  • public class NameParser
    extends Object
    Parses a human's name to a CSLName object
    Author:
    Michel Kraemer
    • Constructor Detail

      • NameParser

        public NameParser()
    • Method Detail

      • parse

        public static CSLName[] parse​(String names)

        Parses names to CSLName objects. Also handles strings containing multiple names separated by and. The method always returns at least one object, even if the given names cannot be parsed. In this case the returned object just contains a literal string.

        Special handling is provided for names enclosed in braces {}, which are meant to be preserved as-is in the output.

        Parameters:
        names - the names to parse
        Returns:
        the CSLName objects (never null and never empty)