Class NSString
- Namespace
- CarinaStudio.MacOS.ObjectiveC
- Assembly
- CarinaStudio.AppBase.MacOS.dll
NSString.
public class NSString : NSObject, IDisposable, IEquatable<NSObject>, IComparable<NSString>, IEquatable<NSString>
- Inheritance
-
NSString
- Implements
- Inherited Members
- Extension Methods
Constructors
NSString()
Initialize new NSString instance.
public NSString()
NSString(string)
Initialize new NSString instance.
public NSString(string s)
Parameters
sstringCharacters.
Properties
Length
Get number of characters.
public int Length { get; }
Property Value
Methods
CompareTo(NSString?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(NSString? s)
Parameters
sNSString
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
Equals(NSString?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(NSString? s)
Parameters
sNSString
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(NSString?, NSString?)
Equality operator.
public static bool operator ==(NSString? l, NSString? r)
Parameters
Returns
operator !=(NSString?, NSString?)
Inequality operator.
public static bool operator !=(NSString? l, NSString? r)