public class

TextUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.TextUtil

Class Overview

You can never have enough StringUtils or TextUtils

Summary

Public Constructors
TextUtil()
Public Methods
@Nonnull static String lpad(String original, int minLength)
Pad the incoming String with spaces on the left to the given desired length.
@Nonnull static String rpad(String original, int minLength)
Pad the incoming String with spaces on the right to the given desired length.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TextUtil ()

Public Methods

@Nonnull public static String lpad (String original, int minLength)

Pad the incoming String with spaces on the left to the given desired length.

If the String is already of the minimum size or bigger, return it as is.

Parameters
original the String to pad
minLength the desired length
Returns
  • A string padded with space to reach the desired minimum length

@Nonnull public static String rpad (String original, int minLength)

Pad the incoming String with spaces on the right to the given desired length.

If the String is already of the minimum size or bigger, return it as is.

Parameters
original the String to pad
minLength the desired length
Returns
  • A string padded with space to reach the desired minimum length