Here you can find the source of sanitizeLineSpaces(String line)
Parameter | Description |
---|---|
line | the line to sanitize |
public static String sanitizeLineSpaces(String line)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w. j a va 2 s .c o m * Replaces all tabs and multiple spaces with a single space * * @param line * the line to sanitize * @return the sanitized line */ public static String sanitizeLineSpaces(String line) { return line.replaceAll("\\s+", " ").trim(); } }