Package java.lang

Examples of java.lang.String.substring()


            String elem = (String) elems.nextElement ();
            int i = elem.indexOf (LTB);
            boolean changed = false;
            while (i != -1) {
                if (i == 0)
                    elem = " " + elem.substring (2);
                else
                    elem = elem.substring (0, i) + " " + elem.substring (i+2);
                changed = true;
                i = elem.indexOf (LTB);
            }
View Full Code Here


            boolean changed = false;
            while (i != -1) {
                if (i == 0)
                    elem = " " + elem.substring (2);
                else
                    elem = elem.substring (0, i) + " " + elem.substring (i+2);
                changed = true;
                i = elem.indexOf (LTB);
            }
            int lsIncr = lineSeparator.length () - 1;
            for (i=0; i<elem.length (); i++) {
View Full Code Here

            boolean changed = false;
            while (i != -1) {
                if (i == 0)
                    elem = " " + elem.substring (2);
                else
                    elem = elem.substring (0, i) + " " + elem.substring (i+2);
                changed = true;
                i = elem.indexOf (LTB);
            }
            int lsIncr = lineSeparator.length () - 1;
            for (i=0; i<elem.length (); i++) {
View Full Code Here

                i = elem.indexOf (LTB);
            }
            int lsIncr = lineSeparator.length () - 1;
            for (i=0; i<elem.length (); i++) {
                if (elem.charAt (i) == NL) {
                    elem = elem.substring (0, i) +
                        lineSeparator + elem.substring (i+1);
                    i += lsIncr;
                    changed = true;
                }
            }
View Full Code Here

            }
            int lsIncr = lineSeparator.length () - 1;
            for (i=0; i<elem.length (); i++) {
                if (elem.charAt (i) == NL) {
                    elem = elem.substring (0, i) +
                        lineSeparator + elem.substring (i+1);
                    i += lsIncr;
                    changed = true;
                }
            }
            if (changed)
View Full Code Here

            return;
        }

        altDDName = altDDName.trim();
        if (altDDName.startsWith("/")) {
            altDDName = altDDName.substring(1);
        }
     
        String appLoc = dc.getSource().getParentArchive().getURI().getPath();
        altDDName = appLoc + altDDName;
View Full Code Here

    }
  m = ratioPat.matcher(s);
  if(m.matches())
    {
    String numerator = m.group(1);
    if (numerator.startsWith("+")) numerator = numerator.substring(1);

    return Numbers.divide(Numbers.reduceBigInt(BigInt.fromBigInteger(new BigInteger(numerator))),
                          Numbers.reduceBigInt(BigInt.fromBigInteger(new BigInteger(m.group(2)))));
    }
  return null;
View Full Code Here

        }

        // Get absolute path of sitemap directory
        org.apache.cocoon.environment.Source input_source = resolver.resolve("");
        String sitemapPath = input_source.getSystemId();
        sitemapPath = sitemapPath.substring(5); // Remove "file:" protocol
        getLogger().debug("Absolute SITEMAP Directory: " + sitemapPath);
        getLogger().debug("Absolute XML Root Directory: " + sitemapPath + xmlRoot);
        getLogger().debug("Absolute XSL Root Directory: " + sitemapPath + xslRoot);
        getLogger().debug("Absolute XSD Root Directory: " + sitemapPath + xsdRoot);
        getLogger().debug("Absolute Temp Root Directory: " + sitemapPath + tempRoot);
View Full Code Here

        String source, Parameters params)
        throws IOException, ComponentException, SAXException, ProcessingException {
        // Get absolute path of sitemap directory
        org.apache.cocoon.environment.Source input_source = resolver.resolve("");
        String sitemapPath = input_source.getSystemId();
        sitemapPath = sitemapPath.substring(5); // Remove "file:" protocol
        getLogger().debug(".act(): Absolute Sitemap Directory: " + sitemapPath);
        getLogger().debug(".act(): Absolute XML Root Directory: " + sitemapPath + xmlRoot);
        getLogger().debug(".act(): Absolute XSL Root Directory: " + sitemapPath + xslRoot);
        getLogger().debug(".act(): Absolute XSD Root Directory: " + sitemapPath + xsdRoot);
        getLogger().debug(".act(): Absolute Temp Root Directory: " + sitemapPath + tempRoot);
View Full Code Here

  {
        // Get the current time and convert to a String
        long millis = System.currentTimeMillis();
        Timestamp ts = new Timestamp(millis);
        String s = ts.toString();
        s = s.substring(0, s.lastIndexOf("."));
        return s;
  }

  // no instances permitted.
  private CurrentTime() {}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.