package js.lib; /** Allows manipulation and formatting of text strings and determination and location of substrings within strings. **/ typedef IString = { /** Returns a string representation of a string. **/ function toString():String; /** Returns the character at the specified index. **/ function charAt(pos:Float):String; /** Returns the Unicode value of the character at the specified location. **/ function charCodeAt(index:Float):Float; /** Returns a string that contains the concatenation of two or more strings. **/ function concat(strings:haxe.extern.Rest):String; /** Returns the position of the first occurrence of a substring. **/ function indexOf(searchString:String, ?position:Float):Float; /** Returns the last occurrence of a substring in the string. **/ function lastIndexOf(searchString:String, ?position:Float):Float; /** Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale. **/ @:overload(function(that:String, ?locales:ts.AnyOf2>, ?options:js.lib.intl.Collator.CollatorOptions):Float { }) function localeCompare(that:String):Float; /** Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string an object that supports being matched against, and returns an array containing the results of that search. **/ @:overload(function(matcher:{ }):Null { }) function match(regexp:ts.AnyOf2):Null; /** Replaces text in a string, using a regular expression or search string. Replaces text in a string, using a regular expression or search string. Replaces text in a string, using an object that supports replacement within a string. Replaces text in a string, using an object that supports replacement within a string. **/ @:overload(function(searchValue:ts.AnyOf2, replacer:(substring:String, args:haxe.extern.Rest) -> String):String { }) @:overload(function(searchValue:{ }, replaceValue:String):String { }) @:overload(function(searchValue:{ }, replacer:(substring:String, args:haxe.extern.Rest) -> String):String { }) function replace(searchValue:ts.AnyOf2, replaceValue:String):String; /** Finds the first substring match in a regular expression search. Finds the first substring match in a regular expression search. **/ @:overload(function(searcher:{ }):Float { }) function search(regexp:ts.AnyOf2):Float; /** Returns a section of a string. **/ function slice(?start:Float, ?end:Float):String; /** Split a string into substrings using the specified separator and return them as an array. Split a string into substrings using the specified separator and return them as an array. **/ @:overload(function(splitter:{ }, ?limit:Float):Array { }) function split(separator:ts.AnyOf2, ?limit:Float):Array; /** Returns the substring at the specified location within a String object. **/ function substring(start:Float, ?end:Float):String; /** Converts all the alphabetic characters in a string to lowercase. **/ function toLowerCase():String; /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. **/ function toLocaleLowerCase(?locales:ts.AnyOf2>):String; /** Converts all the alphabetic characters in a string to uppercase. **/ function toUpperCase():String; /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. **/ function toLocaleUpperCase(?locales:ts.AnyOf2>):String; /** Removes the leading and trailing white space and line terminator characters from a string. **/ function trim():String; /** Returns the length of a String object. **/ final length : Float; /** Gets a substring beginning at the specified location and having the specified length. **/ function substr(from:Float, ?length:Float):String; /** Returns the primitive value of the specified object. **/ function valueOf():String; /** Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. **/ function codePointAt(pos:Float):Null; /** Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false. **/ function includes(searchString:String, ?position:Float):Bool; /** Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false. **/ function endsWith(searchString:String, ?endPosition:Float):Bool; /** Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. **/ @:overload(function(?form:String):String { }) function normalize(form:String):String; /** Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned. **/ function repeat(count:Float):String; /** Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false. **/ function startsWith(searchString:String, ?position:Float):Bool; /** Returns an HTML anchor element and sets the name attribute to the text value **/ function anchor(name:String):String; /** Returns a HTML element **/ function big():String; /** Returns a HTML element **/ function blink():String; /** Returns a HTML element **/ function bold():String; /** Returns a HTML element **/ function fixed():String; /** Returns a HTML element and sets the color attribute value **/ function fontcolor(color:String):String; /** Returns a HTML element and sets the size attribute value Returns a HTML element and sets the size attribute value **/ @:overload(function(size:String):String { }) function fontsize(size:Float):String; /** Returns an HTML element **/ function italics():String; /** Returns an HTML element and sets the href attribute value **/ function link(url:String):String; /** Returns a HTML element **/ function small():String; /** Returns a HTML element **/ function strike():String; /** Returns a HTML element **/ function sub():String; /** Returns a HTML element **/ function sup():String; /** Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string. **/ function padStart(maxLength:Float, ?fillString:String):String; /** Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string. **/ function padEnd(maxLength:Float, ?fillString:String):String; /** Removes the trailing white space and line terminator characters from a string. **/ function trimEnd():String; /** Removes the leading white space and line terminator characters from a string. **/ function trimStart():String; /** Removes the leading white space and line terminator characters from a string. **/ function trimLeft():String; /** Removes the trailing white space and line terminator characters from a string. **/ function trimRight():String; /** Matches a string with a regular expression, and returns an iterable of matches containing the results of that search. **/ function matchAll(regexp:js.lib.RegExp):js.lib.IterableIterator; /** Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array. **/ function at(index:Float):Null; };