String.ContentEquals Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ContentEquals(String) |
Compares this string to the specified |
ContentEquals(ICharSequence) |
Compares this string to the specified |
ContentEquals(StringBuffer) |
Compares this string to the specified |
ContentEquals(String)
Compares this string to the specified CharSequence
.
public bool ContentEquals (string cs);
member this.ContentEquals : string -> bool
Parameters
- cs
- String
The sequence to compare this String
against
Returns
true
if this String
represents the same
sequence of char values as the specified sequence, false
otherwise
Remarks
Compares this string to the specified CharSequence
. The result is true
if and only if this String
represents the same sequence of char values as the specified sequence. Note that if the CharSequence
is a StringBuffer
then the method synchronizes on it.
For finer-grained String comparison, refer to java.text.Collator
.
Added in 1.5.
Java documentation for java.lang.String.contentEquals(java.lang.CharSequence)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
ContentEquals(ICharSequence)
Compares this string to the specified CharSequence
.
[Android.Runtime.Register("contentEquals", "(Ljava/lang/CharSequence;)Z", "")]
public bool ContentEquals (Java.Lang.ICharSequence cs);
[<Android.Runtime.Register("contentEquals", "(Ljava/lang/CharSequence;)Z", "")>]
member this.ContentEquals : Java.Lang.ICharSequence -> bool
Parameters
The sequence to compare this String
against
Returns
true
if this String
represents the same
sequence of char values as the specified sequence, false
otherwise
- Attributes
Remarks
Compares this string to the specified CharSequence
. The result is true
if and only if this String
represents the same sequence of char values as the specified sequence. Note that if the CharSequence
is a StringBuffer
then the method synchronizes on it.
For finer-grained String comparison, refer to java.text.Collator
.
Added in 1.5.
Java documentation for java.lang.String.contentEquals(java.lang.CharSequence)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
ContentEquals(StringBuffer)
Compares this string to the specified StringBuffer
.
[Android.Runtime.Register("contentEquals", "(Ljava/lang/StringBuffer;)Z", "")]
public bool ContentEquals (Java.Lang.StringBuffer sb);
[<Android.Runtime.Register("contentEquals", "(Ljava/lang/StringBuffer;)Z", "")>]
member this.ContentEquals : Java.Lang.StringBuffer -> bool
Parameters
- sb
- StringBuffer
The StringBuffer
to compare this String
against
Returns
true
if this String
represents the same
sequence of characters as the specified StringBuffer
,
false
otherwise
- Attributes
Exceptions
if sb
is null
.
Remarks
Compares this string to the specified StringBuffer
. The result is true
if and only if this String
represents the same sequence of characters as the specified StringBuffer
. This method synchronizes on the StringBuffer
.
For finer-grained String comparison, refer to java.text.Collator
.
Added in 1.4.
Java documentation for java.lang.String.contentEquals(java.lang.StringBuffer)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.