Beispiel #1
0
  public String toString() {
    int len = CoreFoundation.INSTANCE.CFStringGetLength(this);
    Memory m = new Memory(len * 2);

    CFRange.ByValue range = new CFRange.ByValue();
    range.len = len;
    range.loc = 0;

    CoreFoundation.INSTANCE.CFStringGetCharacters(this, range, m);

    // return m.getString(0, true);
    return hack(m);
  }
Beispiel #2
0
 public static CFStringRef CFSTR(String str) {
   final char[] chars = str.toCharArray();
   return CoreFoundation.INSTANCE.CFStringCreateWithCharacters(null, chars, chars.length);
 }