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

com.inamik.text.tables.line.LeftAlign Maven / Gradle / Ivy

The newest version!
/*
 * iNamik Text Tables for Java
 * 
 * Copyright (C) 2016 David Farrell ([email protected])
 *
 * Licensed under The MIT License (MIT), see LICENSE.txt
 */
package com.inamik.text.tables.line;

import com.inamik.text.tables.line.base.FunctionWithCharAndWidth;

public final class LeftAlign  extends FunctionWithCharAndWidth
{
    public static final LeftAlign INSTANCE = new LeftAlign();

    @Override
    public String apply(Character fill, Integer width, String line) {
        line = RightTruncate.INSTANCE.apply(width, line);
        line = RightPad     .INSTANCE.apply(fill, width, line);
        return line;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy