OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

org.ecmascript.primitive
Class String

org.ecmascript.object.Object
   |
   +--org.ecmascript.primitive.String

public class String
extends Object
The native browser JavaScript object used to work with text.
An instance can also be created with the shorthand "initial value".

Note that this object is implemented and supported by the web browser and results of its use may vary.



Field Summary

public Number
length
The number of characters in the string.


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
String(String value)
The native browser JavaScript object used to work with text.


Method Summary

public String
anchor(String name)
Creates HTML markup representing an HTML a tag where the body of the tag is the value of the string and the specified value is the name attribute.
public String
big()
Creates HTML markup representing an HTML big tag where the body of the tag is the value of the string.
public String
blink()
Creates HTML markup representing an HTML blink tag where the body of the tag is the value of the string.
public String
bold()
Creates HTML markup representing an HTML b tag where the body of the tag is the value of the string.
public String
charAt(Number index)
Retrieves the character in the string at the specified index.
public Number
charCodeAt(Number index)
Retrieves the Unicode value of the character in the string at the specified index.
public String
concat(String... stringToAppend)
Creates a new String that combines this String with the specified Strings.
public String
fixed()
Creates HTML markup representing an HTML tt tag where the body of the tag is the value of the string.
public String
fontcolor(String color)
Creates HTML markup representing an HTML font tag where the body of the tag is the value of the string and the specified value is the color attribute.
public String
fontsize(String size)
Creates HTML markup representing an HTML font tag where the body of the tag is the value of the string and the specified value is the size attribute.
public static String
fromCharCode(Number... charCodes)
Generates a new String using characters specified by Unicode values.
public Number
indexOf(String substring, Number startingIndex)
Retrieves the index at which the specified substring is found.
public String
italics()
Creates HTML markup representing an HTML i tag where the body of the tag is the value of the string.
public Number
lastIndexOf(String substring, Number startingIndex)
Retrieves the last index at which the specified substring is found.
public String
link(String href)
Creates HTML markup representing an HTML a tag where the body of the tag is the value of the string and the specified value is the href attribute.
public String
match(RegExp pattern)
Retrieves the match in this string for the given pattern.
public String
replace(RegExp pattern, String replacement)
Exchanges the match or matches in this string for the given pattern with the given replacement.
public Number
search(RegExp pattern)
Searches this string for the given pattern.
public Number
slice(Number start, Number end)
Retrieves a substring of of this string.
public String
small()
Creates HTML markup representing an HTML small tag where the body of the tag is the value of the string.
public Array<String>
split(RegExp pattern, Number splitsToInclude)
Splits this string into an array of pieces.
public String
strike()
Creates HTML markup representing an HTML strike tag where the body of the tag is the value of the string.
public String
sub()
Creates HTML markup representing an HTML sub tag where the body of the tag is the value of the string.
public Number
substr(Number start, Number length)
Retrieves a substring of of this string.
public Number
substring(Number start, Number end)
Retrieves a substring of of this string.
public String
sup()
Creates HTML markup representing an HTML sup tag where the body of the tag is the value of the string.
public String
toLowerCase()
Creates a lower case representation of this string.
public String
toUpperCase()
Creates an upper case representation of this string.


Field Detail


length

public Number length

The number of characters in the string.

Constructor Detail


String

public String(String value)

The native browser JavaScript object used to work with text.
An instance can also be created with the shorthand "initial value".

Note that this object is implemented and supported by the web browser and results of its use may vary.

Parameters:
value  -  the initial value

Method Detail


anchor

public String anchor(String name)

Creates HTML markup representing an HTML a tag where the body of the tag is the value of the string and the specified value is the name attribute.

Parameters:
name  -  the value to be used in the name attribute
Return:
String - HTML markup

big

public String big()

Creates HTML markup representing an HTML big tag where the body of the tag is the value of the string.

Return:
String - HTML markup

blink

public String blink()

Creates HTML markup representing an HTML blink tag where the body of the tag is the value of the string.

Return:
String - HTML markup

bold

public String bold()

Creates HTML markup representing an HTML b tag where the body of the tag is the value of the string.

Return:
String - HTML markup

charAt

public String charAt(Number index)

Retrieves the character in the string at the specified index.

Parameters:
index  -  the character index to retrieve
Return:
String - the specified character or empty string if no character was found

charCodeAt

public Number charCodeAt(Number index)

Retrieves the Unicode value of the character in the string at the specified index.

Parameters:
index  -  the character index to retrieve
Return:
Number - the Unicode value of the specified character or Number.NaN if no character was found

concat

public String concat(String... stringToAppend)

Creates a new String that combines this String with the specified Strings.

Parameters:
stringToAppend  -  the Strings to append to this String
Return:
String - a new String

fixed

public String fixed()

Creates HTML markup representing an HTML tt tag where the body of the tag is the value of the string.

Return:
String - HTML markup

fontcolor

public String fontcolor(String color)

Creates HTML markup representing an HTML font tag where the body of the tag is the value of the string and the specified value is the color attribute.

Parameters:
color  -  the value to be used in the color attribute
Return:
String - HTML markup

fontsize

public String fontsize(String size)

Creates HTML markup representing an HTML font tag where the body of the tag is the value of the string and the specified value is the size attribute.

Parameters:
size  -  the value (e.g. 1-7) to be used in the size attribute
Return:
String - HTML markup

fromCharCode

public static String fromCharCode(Number... charCodes)

Generates a new String using characters specified by Unicode values.

Parameters:
charCodes  -  the Unicode values to be used to generate the String
Return:
String - a new String

indexOf

public Number indexOf(String substring,
                      Number startingIndex)

Retrieves the index at which the specified substring is found.

Parameters:
substring  -  the substring to search for
startingIndex  -  the optional index at which to begin the search
Default value = 0
Return:
Number - the index where the substring was found or -1 if not found

italics

public String italics()

Creates HTML markup representing an HTML i tag where the body of the tag is the value of the string.

Return:
String - HTML markup

lastIndexOf

public Number lastIndexOf(String substring,
                          Number startingIndex)

Retrieves the last index at which the specified substring is found.

Parameters:
substring  -  the substring to search for
startingIndex  -  the optional index at which to begin the search
Default value = 0
Return:
Number - the index where the substring was found or -1 if not found

link

public String link(String href)

Creates HTML markup representing an HTML a tag where the body of the tag is the value of the string and the specified value is the href attribute.

Parameters:
href  -  the value to be used in the href attribute
Return:
String - HTML markup

match

public String match(RegExp pattern)

Retrieves the match in this string for the given pattern.

Parameters:
pattern  -  the regular expression pattern
Return:
String - the match in this string where the pattern matches, or null if not found

replace

public String replace(RegExp pattern,
                      String replacement)

Exchanges the match or matches in this string for the given pattern with the given replacement.

Parameters:
pattern  -  the regular expression pattern
replacement  -  the replacement to use where the matches are found
Return:
String - this string where the pattern matches are exchanged with the replacement

search

public Number search(RegExp pattern)

Searches this string for the given pattern.

Parameters:
pattern  -  the regular expression pattern
Return:
Number - the index in this string where the pattern matches, or -1 if not found

slice

public Number slice(Number start,
                    Number end)

Retrieves a substring of of this string.

Parameters:
start  -  the optional index at which to begin the substring; a negative number will cause the index to be counted at the end of the this string
Default value = 0
end  -  the optional index at which to end the search, the character at this index will not be included; a negative number will cause the index to be counted at the end of this string
Return:
Number - the specified substring
See also:
substr(Number, Number)
substring(Number, Number)

small

public String small()

Creates HTML markup representing an HTML small tag where the body of the tag is the value of the string.

Return:
String - HTML markup

split

public Array<String> split(RegExp pattern,
                           Number splitsToInclude)

Splits this string into an array of pieces.

Parameters:
pattern  -  the regular expression pattern
splitsToInclude  -  optional number of splits to include in the result
Return:
Array<String> - the split up sections of this string

strike

public String strike()

Creates HTML markup representing an HTML strike tag where the body of the tag is the value of the string.

Return:
String - HTML markup

sub

public String sub()

Creates HTML markup representing an HTML sub tag where the body of the tag is the value of the string.

Return:
String - HTML markup

substr

public Number substr(Number start,
                     Number length)

Retrieves a substring of of this string.

Parameters:
start  -  the optional index at which to begin the substring; a negative number will cause the index to be counted at the end of the this string
Default value = 0
length  -  the optional number of characters to include; if not specified, all of the remaining characters will be included
Return:
Number - the specified substring
See also:
slice(Number, Number)
substring(Number, Number)

substring

public Number substring(Number start,
                        Number end)

Retrieves a substring of of this string.

Parameters:
start  -  the optional non-negative index at which to begin the substring
Default value = 0
end  -  the optional non-negative index at which to end the search, the character at this index will not be included
Return:
Number - the specified substring
See also:
slice(Number, Number)
substr(Number, Number)

sup

public String sup()

Creates HTML markup representing an HTML sup tag where the body of the tag is the value of the string.

Return:
String - HTML markup

toLowerCase

public String toLowerCase()

Creates a lower case representation of this string.

Return:
String - the lower case representation of this string

toUpperCase

public String toUpperCase()

Creates an upper case representation of this string.

Return:
String - the upper case representation of this string

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.04.27 02:28 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.