Packagecom.adobe.fiber.runtime.lib
Classpublic class StringFunc
InheritanceStringFunc Inheritance Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The StringFunc class defines the implementations of the expression runtime functions for String functions for the Adobe application modeling language.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
[static] Return the character at the indicated position.
StringFunc
  
[static] Return the character with the provided code.
StringFunc
  
[static] Compare two strings lexgraphically.
StringFunc
  
[static] Compare two strings lexgraphically, ignoring case.
StringFunc
  
[static] Tests if this string ends with the specified suffix.
StringFunc
  
find(sub:String, str:String):int
[static] Return the index of the substring within the string.
StringFunc
  
[static] Returns the index within this string of the rightmost occurrence of the specified substring.
StringFunc
  
[static] Returns the index within this string of the rightmost occurrence of the specified substring, ignoring case.
StringFunc
  
[static] Return the index of the substring within the string, ignoring case.
StringFunc
  
[static] Finds the first occurrence of any one of a set of characters in a string.
StringFunc
 Inherited
Indicates whether an object has a specified property defined.
Object
  
insert(sub:String, str:String, pos:int):String
[static] Inserts a substring in a string after a specified character position.
StringFunc
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
left(str:String, count:int):String
[static] Get the leftmost characters from a string.
StringFunc
  
[static] Removes whitespace from the front of the specified string.
StringFunc
  
[static] Return the length of a string.
StringFunc
  
[static] Convert a string to lowercase.
StringFunc
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
removeChars(str:String, start:int, count:int):String
[static] Return a copy of the string, with count characters removed from the specified start position.
StringFunc
  
[static] Creates a string that contains a specified number of repetitions of the specified string.
StringFunc
  
replace(input:String, search:String, replace:String):String
[static] Replaces first occurrence of search in the input string with replace.
StringFunc
  
replaceAll(input:String, search:String, replace:String):String
[static] Replaces all occurrences of search in the input string with replace.
StringFunc
  
replaceAllNoCase(input:String, search:String, replace:String):String
[static] Replaces all occurrences of search in the input string with replace.
StringFunc
  
replaceNoCase(input:String, search:String, replace:String):String
[static] Replaces first occurrence of search in the input string with replace.
StringFunc
  
[static] Reverse the characters in a string.
StringFunc
  
right(str:String, count:int):String
[static] Returns the specified number of characters from the end (or right side) of the specified string.
StringFunc
  
[static] Remove trailing white space from a string.
StringFunc
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
[static] Gets characters from a string, from the beginning to a character that is in a specified set of characters.
StringFunc
  
[static] Gets characters from a string, from the beginning to a character that is not in a specified set of characters.
StringFunc
  
[static] Return true if string starts with a specified prefix.
StringFunc
  
[static] Extracts a substring from a string, beginning at start, of length count.
StringFunc
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
[static] Remove whitespace from the start and end of a string.
StringFunc
  
[static] Convert a string to uppercase.
StringFunc
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail
charAt()method
public static function charAt(s:String, pos:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the character at the indicated position.

Parameters

s:String — string
 
pos:int — position - 0 is the first character in the string

Returns
String — the character
chr()method 
public static function chr(c:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the character with the provided code.

Parameters

c:int — code

Returns
String — a character
compare()method 
public static function compare(s1:String, s2:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Compare two strings lexgraphically.

Parameters

s1:String — a string
 
s2:String — a string

Returns
int — the value 0 if the argument string is equal to this string; -1 if this string is lexicographically less than the string argument; +1 if this string is lexicographically greater than the string argument.
compareNoCase()method 
public static function compareNoCase(s1:String, s2:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Compare two strings lexgraphically, ignoring case.

Parameters

s1:String — a string
 
s2:String — a string

Returns
int — the value 0 if the argument string is equal to this string; -1 if this string is lexicographically less than the string argument; +1 if this string is lexicographically greater than the string argument.
endsWith()method 
public static function endsWith(sub:String, str:String):Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Tests if this string ends with the specified suffix.

Parameters

sub:String — the suffix to test
 
str:String — the string

Returns
Boolean — true if the string ends with the suffix
find()method 
public static function find(sub:String, str:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the index of the substring within the string.

Parameters

sub:String — substring to find
 
str:String — the string

Returns
int — the index of the substring, or -1 if not found
findLast()method 
public static function findLast(sub:String, str:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the index within this string of the rightmost occurrence of the specified substring.

Parameters

sub:String — the substring to look for
 
str:String — the string

Returns
int — the index of the first character of the last substring is returned or -1 if not found.
findLastNoCase()method 
public static function findLastNoCase(sub:String, str:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the index within this string of the rightmost occurrence of the specified substring, ignoring case.

Parameters

sub:String — the substring to look for
 
str:String — the string

Returns
int — the index of the first character of the last substring is returned or -1 if not found.
findNoCase()method 
public static function findNoCase(sub:String, str:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the index of the substring within the string, ignoring case.

Parameters

sub:String — substring to find
 
str:String — the string

Returns
int — the index of the substring, or -1 if not found
findOneOf()method 
public static function findOneOf(cset:String, str:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Finds the first occurrence of any one of a set of characters in a string. The search is case-sensitive.

Parameters

cset:String — the set of characters to look for
 
str:String — the string

Returns
int — the position of the first member of set found in string; or -1, if no member of set is found in string.
insert()method 
public static function insert(sub:String, str:String, pos:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Inserts a substring in a string after a specified character position. If position = -1, prefixes the substring to the string.

Parameters

sub:String — the string to insert
 
str:String — the string
 
pos:int — the position to insert the substring

Returns
String — the new string
left()method 
public static function left(str:String, count:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Get the leftmost characters from a string.

Parameters

str:String — the string
 
count:int — how many characters

Returns
String — the leftmost count characters of the given string
leftTrim()method 
public static function leftTrim(input:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Removes whitespace from the front of the specified string.

Parameters

input:String — The String whose beginning whitespace will will be removed.

Returns
String — A String with whitespace removed from the begining
len()method 
public static function len(s:String):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the length of a string.

Parameters

s:String — the string

Returns
int — length
lower()method 
public static function lower(str:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Convert a string to lowercase.

Parameters

str:String — the string

Returns
String — the string, converted to lowercase.
removeChars()method 
public static function removeChars(str:String, start:int, count:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return a copy of the string, with count characters removed from the specified start position. If start or count is invalid, the original string is returned.

Parameters

str:String — the string
 
start:int — the starting character to remove
 
count:int — the number of characters to remove

Returns
String — a new string with the characters removed
repeatString()method 
public static function repeatString(str:String, count:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Creates a string that contains a specified number of repetitions of the specified string.

Parameters

str:String — the string
 
count:int — the number of times to repeat str

Returns
String — the new string
replace()method 
public static function replace(input:String, search:String, replace:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Replaces first occurrence of search in the input string with replace. The search is case-sensitive.

Parameters

input:String — the string to search
 
search:String — what to look for
 
replace:String — what to replace it with

Returns
String — the new string
replaceAll()method 
public static function replaceAll(input:String, search:String, replace:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Replaces all occurrences of search in the input string with replace. The search is case-sensitive.

Parameters

input:String — the string to search
 
search:String — what to look for
 
replace:String — what to replace it with

Returns
String — the new string
replaceAllNoCase()method 
public static function replaceAllNoCase(input:String, search:String, replace:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Replaces all occurrences of search in the input string with replace. The search is case-insensitive.

Parameters

input:String — the string to search
 
search:String — what to look for
 
replace:String — what to replace it with

Returns
String — the new string
replaceNoCase()method 
public static function replaceNoCase(input:String, search:String, replace:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Replaces first occurrence of search in the input string with replace. The search is case-insensitive.

Parameters

input:String — the string to search
 
search:String — what to look for
 
replace:String — what to replace it with

Returns
String — the new string
reverse()method 
public static function reverse(s:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Reverse the characters in a string.

Parameters

s:String — the string

Returns
String — a new string with the characters in reverse order
right()method 
public static function right(str:String, count:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the specified number of characters from the end (or right side) of the specified string.

Parameters

str:String — the string
 
count:int — the number of rightmost characters

Returns
String — the rightmost count characters of the given string
rightTrim()method 
public static function rightTrim(input:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Remove trailing white space from a string.

Parameters

input:String — the string to trim

Returns
String — the string with trailing whitespace removed
spanExcluding()method 
public static function spanExcluding(str:String, cset:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Gets characters from a string, from the beginning to a character that is in a specified set of characters. The search is case-sensitive. Example SpanExcluding("MyString", "Sin") will return "My" as after that it hits 'S' which is present in 2nd string.

Parameters

str:String — the string
 
cset:String — the set of characters to stop on

Returns
String — the substring of str
spanIncluding()method 
public static function spanIncluding(str:String, cset:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Gets characters from a string, from the beginning to a character that is not in a specified set of characters. The search is case-sensitive. example : SpanIncluding("mystring", "mystery") will return "mystr"

Parameters

str:String — the string
 
cset:String — the set of characters to include

Returns
String — the substring of str
startsWith()method 
public static function startsWith(prefix:String, input:String):Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return true if string starts with a specified prefix.

Parameters

prefix:String — the prefix string
 
input:String — the string

Returns
Boolean — true if the string starts with prefix
substring()method 
public static function substring(str:String, s:int, c:int):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Extracts a substring from a string, beginning at start, of length count.

Parameters

str:String — the string
 
s:int — the first character to extract (indexes start at 0)
 
c:int — the number of characters

Returns
String — the substring
trim()method 
public static function trim(s:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Remove whitespace from the start and end of a string.

Parameters

s:String — the string

Returns
String — a copy of the string with no leading or trailing whitespace
upper()method 
public static function upper(s:String):String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Convert a string to uppercase.

Parameters

s:String — the string

Returns
String — the string converted to uppercase