Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / java / lang / natStringBuilder.cc
blobe2c8c29f6e3974c4b7f8dbbbcbdee728abb25caa
1 // Native methods for StringBuilder.
3 /* Copyright (C) 2005 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #include <config.h>
12 #include <gcj/cni.h>
13 #include <java/lang/StringBuilder.h>
14 #include <java/lang/String.h>
16 jboolean
17 java::lang::StringBuilder::regionMatches(jint offset, jstring other)
19 int len = other->count;
20 int index = 0;
21 jchar *sc = elements (value);
22 jchar *oc = _Jv_GetStringChars (other);
23 while (--len >= 0)
25 if (sc[offset++] != oc[index++])
26 return false;
28 return true;