All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.qlexpress4.utils.PrintlnUtils Maven / Gradle / Ivy

package com.alibaba.qlexpress4.utils;

import java.util.function.Consumer;

/**
 * Author: DQinYuan
 */
public class PrintlnUtils {

    public static void printlnByCurDepth(int depth, String str, Consumer debug) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < depth; i++) {
            if (i == depth - 1) {
                builder.append("| ");
            } else {
                builder.append("  ");
            }
        }
        builder.append(str);
        debug.accept(builder.toString());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy