Difference between revisions of "String class"

From Catglobe Wiki
Jump to: navigation, search
Line 13: Line 13:
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 
|Description=<nowiki>Compare to object. See ArrayConstant.OrderBy</nowiki>}}
 
|Description=<nowiki>Compare to object. See ArrayConstant.OrderBy</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Contains</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 +
|Description=<nowiki>Returns true if the value specified occurs in the string</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>EndsWith</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 +
|Description=<nowiki>Returns true if the value specified occurs at the end of the string</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>EndsWith</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>ignoreCase</nowiki>|Description=<nowiki>True to ignore case during comparison</nowiki>}}
 +
|Description=<nowiki>Returns true if the value specified occurs at the end of the string</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>IndexOf</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 +
|Description=<nowiki>Returns the 0-based index of where the value is to be found in the string, or -1</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>IndexOf</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>startIndex</nowiki>|Description=<nowiki>The search starting position</nowiki>}}
 +
|Description=<nowiki>Returns the 0-based index of where the value is to be found in the string, or -1</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>LastIndexOf</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 +
|Description=<nowiki>Returns the 0-based index of where the value is to be found in the string, or -1</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>LastIndexOf</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>startIndex</nowiki>|Description=<nowiki>The search starting position</nowiki>}}
 +
|Description=<nowiki>Returns the 0-based index of where the value is to be found in the string, or -1</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>StartsWith</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>}}
 +
|Description=<nowiki>Returns true if the value specified occurs at the start of the string</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>StartsWith</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to compare to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>ignoreCase</nowiki>|Description=<nowiki>True to ignore case during comparison</nowiki>}}
 +
|Description=<nowiki>Returns true if the value specified occurs at the start of the string</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToLowerInvariant</nowiki>|Description=<nowiki>Returns the string converted to its lower case variant using invariant culture</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToUpperInvariant</nowiki>|Description=<nowiki>Returns the string converted to its upper case variant using invariant culture</nowiki>}}
 
|Properties=
 
|Properties=
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}

Revision as of 06:51, 28 November 2017

String



The string object

Constructors

  • (string value "Value to give object") - New object with the given value

Methods

  • number CompareTo(string value "Value to compare to") - Compare to object. See ArrayConstant.OrderBy
  • number CompareToIgnoreCase(string value "Value to compare to") - Compare to object. See ArrayConstant.OrderBy
  • bool Contains(string value "Value to compare to") - Returns true if the value specified occurs in the string
  • bool EndsWith(string value "Value to compare to") - Returns true if the value specified occurs at the end of the string
  • bool EndsWith(string value "Value to compare to", bool ignoreCase "True to ignore case during comparison") - Returns true if the value specified occurs at the end of the string
  • int IndexOf(string value "Value to compare to") - Returns the 0-based index of where the value is to be found in the string, or -1
  • int IndexOf(string value "Value to compare to", int startIndex "The search starting position") - Returns the 0-based index of where the value is to be found in the string, or -1
  • int LastIndexOf(string value "Value to compare to") - Returns the 0-based index of where the value is to be found in the string, or -1
  • int LastIndexOf(string value "Value to compare to", int startIndex "The search starting position") - Returns the 0-based index of where the value is to be found in the string, or -1
  • bool StartsWith(string value "Value to compare to") - Returns true if the value specified occurs at the start of the string
  • bool StartsWith(string value "Value to compare to", bool ignoreCase "True to ignore case during comparison") - Returns true if the value specified occurs at the start of the string
  • string ToLowerInvariant() - Returns the string converted to its lower case variant using invariant culture
  • string ToString() - The string representation of the object.
  • string ToUpperInvariant() - Returns the string converted to its upper case variant using invariant culture

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.