Enum LineEnding

    • Enum Constant Detail

      • GIT_ATTRIBUTES

        public static final LineEnding GIT_ATTRIBUTES
        Uses the same line endings as Git, using .gitattributes and the core.eol property.
      • PLATFORM_NATIVE

        public static final LineEnding PLATFORM_NATIVE
        \n on unix systems, \r\n on windows systems.
      • WINDOWS

        public static final LineEnding WINDOWS
        \r\n
    • Method Detail

      • values

        public static LineEnding[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LineEnding c : LineEnding.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LineEnding valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • str

        public String str()
        Returns the standard line ending for this policy.
      • toUnix

        public static String toUnix​(String input)
        Returns a string with exclusively unix line endings.