Tabnine Logo
StringUtil2.removeFromEnd
Code IndexAdd Tabnine to your IDE (free)

How to use
removeFromEnd
method
in
ucar.unidata.util.StringUtil2

Best Java code snippets using ucar.unidata.util.StringUtil2.removeFromEnd (Showing top 2 results out of 315)

origin: Unidata/thredds

public CollectionSpecParser(String rootDir, String regExp, Formatter errlog) {
 this.rootDir = StringUtil2.removeFromEnd(rootDir, '/');
 this.subdirs = true;
 this.spec = this.rootDir +"/" + regExp;
 this.filter = java.util.regex.Pattern.compile(spec);
 this.dateFormatMark = null;
 this.filterOnName = false;
}
origin: Unidata/thredds

@Override
public String getProbabilityName() {
 Formatter f = new Formatter();
 int scale1 = Math.max(1, getOctet(38));
 int scale2 = Math.max(1, getOctet(43));
 switch (getProbabilityType()) {
  case 0:
   f.format("below_%s", Format.dfrac(getProbabilityLowerLimit(), scale1));
   break;
  case 1:
   f.format("above_%s", Format.dfrac(getProbabilityUpperLimit(), scale2));
   break;
  case 2:
   if (getProbabilityLowerLimit() == getProbabilityUpperLimit())
    f.format("equals_%s", Format.dfrac(getProbabilityLowerLimit(), scale1));
   else
    f.format("between_%s_and_%s", Format.dfrac(getProbabilityLowerLimit(), scale1), Format.dfrac(getProbabilityUpperLimit(), scale2));
   break;
  case 3:
   f.format("above_%s", Format.dfrac(getProbabilityLowerLimit(), scale1));
   break;
  case 4:
   f.format("below_%s", Format.dfrac(getProbabilityUpperLimit(), scale2));
   break;
  default:
   f.format("UknownProbType=%d", getProbabilityType());
 }
 String result = StringUtil2.removeFromEnd(f.toString(), '0');
 return StringUtil2.removeFromEnd(result, '.');
}
ucar.unidata.utilStringUtil2removeFromEnd

Javadoc

Remove all occurrences of the character c at the end of s.

Popular methods of StringUtil2

  • replace
    Replace any of the characters from out with corresponding character from in
  • remove
    Remove any of the characters in out from sb
  • substitute
    Find all occurences of the "match" in original, and substitute the "subst" string, directly into the
  • cleanup
    Delete any non-printable characters
  • splitString
    Split a string on one or more whitespace. Cover for String.split, because who can remember regexp?
  • unescape
    This finds any '%xx' and converts to the equivalent char. Inverse of escape().
  • collapseWhitespace
    Collapse continuous whitespace into one single " ".
  • allow
    Replace any char not alphanumeric or in allowChars by replaceChar.
  • breakTextAtWords
    Break the given text into lines, respecting word boundaries (blank space).
  • escape
    Escape any char not alphanumeric or in okChars. Escape by replacing char with %xx (hex).
  • getTokens
  • makeValidCdmObjectName
  • getTokens,
  • makeValidCdmObjectName,
  • padLeft,
  • padRight,
  • quoteHtmlContent,
  • unreplace,
  • filter7bits,
  • match,
  • quoteXmlAttribute

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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