Examples of substring()


Examples of ariba.util.core.FastStringBuffer.substring()

            // If we got to the beginning of the format before getting to the
            // beginning of the number, then strip away the remaining digits.
        if (i < j) {
            j++;
            strValue = buf.substring(j, buf.length());
        }
        else {
            strValue = buf.toString();
        }
View Full Code Here

Examples of br.msf.commons.lang.EnhancedStringBuilder.substring()

                    /* source already have a license header. lets replace it */
                    builder.replace(me, getJavaLicense());
                    break;
                case WITHOUT_LICENSE_FILES:
                    /* we consider the default netbeans template as "file without license" */
                    if (builder.substring(me.getStart(), me.getEnd()).contains(NB_LICENSE_TEMPLATE)) {
                        builder.replace(me, getJavaLicense());
                    } else {
                        /* returning null sinalize that this FileObject will not be updated */
                        return null;
                    }
View Full Code Here

Examples of com.caucho.util.CharBuffer.substring()

      return addr.getHostName();
    }

    int p = host.indexOf(':');
    if (p >= 0)
      return host.substring(0, p);
    else
      return host.toString();
  }

  @Override
View Full Code Here

Examples of com.caucho.util.CharSegment.substring()

      for (tail = ++i; tail < len; tail++) {
        if (value.charAt(tail) == end)
          break;
      }

      _readEncoding = Encoding.getMimeName(value.substring(i, tail));

      return _readEncoding;
    }

    int tail;
View Full Code Here

Examples of com.caucho.util.CharSegment.substring()

      if (Character.isWhitespace(value.charAt(tail))
          || value.charAt(tail) == ';')
        break;
    }

    _readEncoding = Encoding.getMimeName(value.substring(i, tail));

    return _readEncoding;
  }

  /**
 
View Full Code Here

Examples of com.ericdaugherty.mail.server.configuration.DefaultSmtpServer.substring()

            // Extract the server and the port if the syntax server:port is used
            int indexPort = mxEntry.indexOf(":");
            if (indexPort >= 0) {
                try {
                    port = Integer.parseInt(mxEntry.substring(indexPort+1));
                }
                catch( Exception e ) {
                    System.out.println("Invalid defaultsmtpserver port: "+mxEntry.substring(indexPort+1)+" - "+e);
                }
                if (indexPort==0) {
View Full Code Here

Examples of com.ericdaugherty.mail.server.configuration.DefaultSmtpServer.substring()

            if (indexPort >= 0) {
                try {
                    port = Integer.parseInt(mxEntry.substring(indexPort+1));
                }
                catch( Exception e ) {
                    System.out.println("Invalid defaultsmtpserver port: "+mxEntry.substring(indexPort+1)+" - "+e);
                }
                if (indexPort==0) {
                    mxEntry = "localhost";
                    mxEntries[index] = mxEntry + mxEntries[index];
                }
View Full Code Here

Examples of com.ericdaugherty.mail.server.configuration.DefaultSmtpServer.substring()

                if (indexPort==0) {
                    mxEntry = "localhost";
                    mxEntries[index] = mxEntry + mxEntries[index];
                }
                else {
                    mxEntry = mxEntry.substring(0, indexPort);
                }
            }

            try {
                socket = new Socket( mxEntry, port );
View Full Code Here

Examples of com.intellij.openapi.util.TextRange.substring()

      PsiTreeUtil.getParentOfType(position, HaxeClassBody.class, HaxeInterfaceBody.class, HaxeEnumBody.class);

    final String text;
    final int offset;
    if (pathToBlockStatement != null) {
      final Pair<String, Integer> pair = HaxeCodeGenerateUtil.wrapStatement(posRange.substring(posFile.getText()));
      text = pair.getFirst();
      offset = pair.getSecond();
    }
    else if (classInterfaceEnum != null) {
      final Pair<String, Integer> pair = HaxeCodeGenerateUtil.wrapFunction(posRange.substring(posFile.getText()));
View Full Code Here

Examples of com.mysema.query.types.path.StringPath.substring()

    }
   
    @Test
    public void IndexOf2() {
        StringPath str = QCat.cat.name;
        assertToString("substring(cat.name,1,locate(?1,cat.name)-1)", str.substring(0, str.indexOf("x")));
    }
   
    @Test
    public void IndexOf3() {
        assertToString("substring(cat.name,2,1)", QCat.cat.name.substring(1,2));
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.