comparison src/share/vm/oops/symbolOop.hpp @ 1144:9b9c1ee9b3f6

Merge
author iveresov
date Wed, 06 Jan 2010 22:21:39 -0800
parents dd57230ba8fe
children c18cbe5936b8
comparison
equal deleted inserted replaced
1129:a5a6adfca6ec 1144:9b9c1ee9b3f6
1 /* 1 /*
2 * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
68 68
69 int utf8_length() const { return _length; } 69 int utf8_length() const { return _length; }
70 70
71 void set_utf8_length(int len) { _length = len; } 71 void set_utf8_length(int len) { _length = len; }
72 72
73 // Compares the symbol with a string 73 // Compares the symbol with a string.
74 bool equals(const char* str, int len) const; 74 bool equals(const char* str, int len) const;
75 bool equals(const char* str) const { return equals(str, (int) strlen(str)); }
76
77 // Tests if the symbol starts with the given prefix.
78 bool starts_with(const char* prefix, int len) const;
79 bool starts_with(const char* prefix) const {
80 return starts_with(prefix, (int) strlen(prefix));
81 }
82
83 // Tests if the symbol starts with the given prefix.
84 int index_of_at(int i, const char* str, int len) const;
85 int index_of_at(int i, const char* str) const {
86 return index_of_at(i, str, (int) strlen(str));
87 }
75 88
76 // Three-way compare for sorting; returns -1/0/1 if receiver is </==/> than arg 89 // Three-way compare for sorting; returns -1/0/1 if receiver is </==/> than arg
77 // note that the ordering is not alfabetical 90 // note that the ordering is not alfabetical
78 inline int fast_compare(symbolOop other) const; 91 inline int fast_compare(symbolOop other) const;
79 92