Package org.python.core

Examples of org.python.core.PyString


                ascii_data.append((char)(this_ch + ' '));
            }
        }
        ascii_data.append('\n'); // Append a courtesy newline

        return new PyString(ascii_data.toString());
    }
View Full Code Here


        }
        // Check that no bits are left
        if (leftbits != 0) {
            throw new PyException(Error, "Incorrect padding");
        }
        return new PyString(bin_data.toString());
    }
View Full Code Here

            ascii_data.append((char)table_b2a_base64[(leftchar&0xf) << 2]);
            ascii_data.append(BASE64_PAD);
        }
        ascii_data.append('\n')// Append a courtesy newline

        return new PyString(ascii_data.toString());
    }
View Full Code Here

        // Output a possible runt byte
        if (leftbits != 0) {
            leftchar <<= (6-leftbits);
            ascii_data.append((char) table_b2a_hqx[leftchar & 0x3f]);
        }
        return new PyString(ascii_data.toString());
    }
View Full Code Here

        for (int i = 0; i < arglen; i++) {
            char ch = argbuf.charAt(i);
            retbuf.append(hexdigit[(ch >>> 4) & 0xF]);
            retbuf.append(hexdigit[ch & 0xF]);
        }
        return new PyString(retbuf.toString());

    }
View Full Code Here

            int bot = Character.digit(argbuf.charAt(i+1), 16);
            if (top == -1 || bot == -1)
                throw Py.TypeError("Non-hexadecimal digit found");
            retbuf.append((char) ((top << 4) + bot));
        }
        return new PyString(retbuf.toString());
    }
View Full Code Here

            }
          } else {
            sb.append(c);
          }
        }
        return new PyString(sb.toString());
    }
View Full Code Here

            }
            count += 3;
            qpEscape(sb, c);
          }
        }
        return new PyString(sb.toString());
    }
View Full Code Here

            sb.append(sp.getString());
        }
        if (ustring) {
            return new PyUnicode(sb.toString());
        }
        return new PyString(sb.toString());
    }
View Full Code Here

                dict.__setitem__(key, null);
            }
        }
        dict.__setitem__("__all__", keys);

        dict.__setitem__("__name__", new PyString(os.getModuleName()));
        dict.__setitem__("__doc__", __doc__);
    }
View Full Code Here

TOP

Related Classes of org.python.core.PyString

Copyright © 2018 www.massapicom. 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.