Package client.net.sf.saxon.ce.tree.util

Examples of client.net.sf.saxon.ce.tree.util.FastStringBuffer.charAt()


                        // No minutes component in timezone
                        fsb.setLength(fsb.length() - 3);
                    }
                }
                if (min < fsb.length() - 3) {
                    if (fsb.charAt(4) == '0') {
                        fsb.removeCharAt(4);
                    }
                }
                return fsb;
            } else {
View Full Code Here


                    }
            }
        }
        String s;
        if (len > 30) {
            if (valueType == ELEMENT && sb.charAt(0) == '{') {
                StructuredQName qn = StructuredQName.fromClarkName(sb.toString());
                String uri = qn.getNamespaceURI();
                if (uri.length() > 15) {
                    uri = "..." + uri.substring(uri.length()-15);
                }
View Full Code Here

                throw new NumberFormatException("no digits in value");
            }

            // remove insignificant trailing zeroes
            while (scale > 0) {
                if (digits.charAt(digits.length()-1) == '0') {
                    digits.setLength(digits.length() - 1);
                    scale--;
                } else {
                    break;
                }
View Full Code Here

                    scale--;
                } else {
                    break;
                }
            }
            if (digits.length() == 0 || (digits.length() == 1 && digits.charAt(0) == '-')) {
                return DecimalValue.ZERO;
            }
            BigInteger bigInt = new BigInteger(digits.toString());
            BigDecimal bigDec = new BigDecimal(bigInt, scale);
            return new DecimalValue(bigDec);
View Full Code Here

                    inWhitespace = false;
                    break;
            }
        }
        int nlen = sb.length();
        if (nlen>0 && sb.charAt(nlen-1)==' ') {
            sb.setLength(nlen-1);
        }
        return sb;
    }
View Full Code Here

                    BigDecimal dec = BigDecimal.valueOf(value);
                    return dec.toString();
                }
            } else if (a < 1e7) {
                FastStringBuffer sb = new FastStringBuffer(Float.toString(value * 10));
                sb.setCharAt(sb.length()-1, (char)((int)sb.charAt(sb.length()-1) - 1));
                return sb;
            } else {
                return Float.toString(value);
            }
        }
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.