Tabnine Logo
TextUtils.appendTail
Code IndexAdd Tabnine to your IDE (free)

How to use
appendTail
method
in
org.hisp.dhis.commons.util.TextUtils

Best Java code snippets using org.hisp.dhis.commons.util.TextUtils.appendTail (Showing top 8 results out of 315)

origin: dhis2/dhis2-core

/**
 * Replaces the first n matches of the given regular expression starting
 * from the beginning of the given string.
 *
 * @param string the string to replace matches.
 * @param regex the regular expression to match the string against.
 * @param replacement the replacement string.
 * @param occurrences the number of matches to replace.
 * @return the replaced string.
 */
public static String replaceFirst( String string, final String regex, final String replacement, final int occurrences )
{
  StringBuffer sb = new StringBuffer();
  Matcher matcher = Pattern.compile( regex ).matcher( string );
  int c = 0;
  while ( matcher.find() && c < occurrences )
  {
    matcher.appendReplacement( sb, replacement );
    c++;
  }
  return appendTail( matcher, sb );
}
origin: dhis2/dhis2-core

private String getSubstitutedVariablesForAnalyticsSql( String expression, ProgramIndicator programIndicator,
  Date startDate, Date endDate )
{
  if ( expression == null )
  {
    return null;
  }
  StringBuffer buffer = new StringBuffer();
  Matcher matcher = ProgramIndicator.VARIABLE_PATTERN.matcher( expression );
  while ( matcher.find() )
  {
    String var = matcher.group( 1 );
    String sql = getVariableAsSql( var, expression, programIndicator.getAnalyticsType(), startDate, endDate );
    if ( sql != null )
    {
      matcher.appendReplacement( buffer, sql );
    }
  }
  return TextUtils.appendTail( matcher, buffer );
}
origin: dhis2/dhis2-core

expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
return TextUtils.appendTail( matcher, sb );
origin: dhis2/dhis2-core

return TextUtils.appendTail( matcher, buffer );
origin: dhis2/dhis2-core

expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
origin: dhis2/dhis2-core

expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
origin: dhis2/dhis2-core

return TextUtils.appendTail( matcher, buffer );
origin: dhis2/dhis2-core

expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
expression = TextUtils.appendTail( matcher, sb );
return TextUtils.appendTail( matcher, sb );
org.hisp.dhis.commons.utilTextUtilsappendTail

Javadoc

Invokes append tail on matcher with the given string buffer, and returns the string buffer as a string.

Popular methods of TextUtils

  • getCommaDelimitedString
    Transforms a collection of Integers into a comma delimited String. If the given collection of elemen
  • removeLastOr
    Removes the last occurrence of the word "or" from the given string, including potential trailing spa
  • removeLastComma
    Removes the last occurrence of comma (",") from the given string, including potential trailing space
  • getQuotedCommaDelimitedString
    Transforms a collection of strings into a comma delimited string, where each component is single-quo
  • removeLast
    Removes the last occurrence of the the given string, including potential trailing spaces.
  • getPrettyClassName
    Returns a pretty name variant of the given class.
  • joinHyphen
    Joins the given elements with a - character as separator.
  • splitSafe
    Gets the string at the given index of the array produced by splitting the given string on the given
  • containsAnyIgnoreCase
    Indicates whether the given string contains any of the given search strings. The operation ignores c
  • emptyIfEqual
    Returns the empty string if the given string is equal to the given test, the string if not.
  • emptyIfFalse
    Returns the empty string if the given test is false, the string if not.
  • getTokens
    Returns a list of tokens based on the given string.
  • emptyIfFalse,
  • getTokens,
  • htmlLinks,
  • htmlNewline,
  • join,
  • removeLastAnd,
  • removeNewlines,
  • replace,
  • splitToArray

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JLabel (javax.swing)
  • JOptionPane (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now