String in ECMAScript 262

Basic object.

Inherits from:

Instance Properties

name type description
constructor Object A reference to the constructor class for the current object instance. [from Object]
length Number (read only) The number of characters in the string.
prototype Object The prototype for a class. [from Object]

Instance Methods

name returns description
charAt(pos) String Return the character at a particular index in the string.
charCodeAt(pos) Number Return the Unicode value of the character at a particular index in the string.
concat([string1],[string2],[...]) String Append one or more strings to the current string, and return the result.
fromCharCode([charCode0],[charCode1],[...]) String Create a new string from a series of Unicode character values.
hasOwnProperty(propertyOrMethodName) Boolean Determines if the object/instance itself has the named property or method. [from Object]
indexOf(searchString,[position]) String Find the offset of a substring within the string.
isPrototypeOf(instanceToTest) Boolean Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object]
lastIndexOf(searchString,[position]) String The offset of a substring within the string.
localeCompare(compareString) Number Compare the string to the argument in the current locale.
match(expr) Array Run the supplied regular expression against the string and return an array of the results.
propertyIsEnumerable(propertyOrMethodName) Boolean Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration. [from Object]
replace(searchExpr,replaceExpr) String Find and replace values in a string, and return the changed string.
search(searchExpr) Number Find the offset of a regular expression within the string.
slice(start,[end]) String Return a specified subsection of the string.
split([separator],[limit]) Array Separate the string into pieces and return an array of the resulting substrings.
substring(start,[end]) String Return a specified subsection of the string.
toLocaleLowerCase() String Return a locale-specific lowercase version of the string.
toLocaleString() String For most objects, the same as toString() unless explicitly overridden. [from Object]
toLocaleUpperCase() String Return a locale-specific uppercase version of the string.
toLowerCase() String Return a lowercase version of the string.
toString() String Returns a string representation of the object. [from Object]
toUpperCase() String Return an uppercase version of the string.
valueOf() String Returns the internal this value of the object. [from Object]

Description

Strings may be constructed using the var foo = new String('string content') constructor, or simply the string literal var foo = 'string content'. Strings defined using a string literal cannot have custom properties, whereas strings defined using the new String("...") constructor can:

var msg1 = "Hello World";
var msg2 = new String("Hello World");
msg1.foo=99;
msg2.foo=99;
// ** msg1.foo is undefined
// ** msg2.foo is 99

Strings may be delimited by either " or ' in pairs; there is no difference between the two other than which is convenient for the particular application. Either character may be used inside such a string by escaping it with a backslash (\).

var msg1 = "Hello World!";
var msg2 = 'Hello World';
var storeName = "Gavin's House of Chips";
var nickName = 'Gavin "The Burninator" Kistner';
var quote = "Did he really say, \"Bob's your uncle?\"";

The shortest (albeit perhaps not the most clear) way of converting any other object type into a string is to concatenate an empty string onto the object. Doing so implicitly calls the toString() method of that object:

var myAge=12;
var myAgeAsString = myAge+"";

Properties that are a String

name object description
abbr [html] HTMLTableCellElement
absoluteURI [pshop] Folder (read only) The full path name for the Folder in URI notation.
absoluteURI [pshop] File (read only) The full path name for the file in URI notation.
accept [html] HTMLInputElement
acceptCharset [html] HTMLFormElement
accessKey [html] HTMLLabelElement
accessKey [html] HTMLAnchorElement
accessKey [html] HTMLLegendElement
accessKey [html] HTMLInputElement
accessKey [html] HTMLAreaElement
accessKey [html] HTMLButtonElement
accessKey [html] HTMLTextAreaElement
action [html] HTMLFormElement
align [html] HTMLIFrameElement
align [html] HTMLInputElement
align [html] HTMLLegendElement
align [html] HTMLDivElement
align [html] HTMLParagraphElement
align [html] HTMLHeadingElement
align [html] HTMLHRElement
align [html] HTMLImageElement
align [html] HTMLObjectElement
align [html] HTMLAppletElement
align [html] HTMLTableCellElement
align [html] HTMLTableRowElement
align [html] HTMLTableSectionElement
align [html] HTMLTableColElement
align [html] HTMLTableCaptionElement
align [html] HTMLTableElement
aLink [html] HTMLBodyElement
alt [html] HTMLInputElement
alt [html] HTMLImageElement
alt [html] HTMLAreaElement
alt [html] HTMLAppletElement
animVal [svg] SVGAnimatedString (read only)
archive [html] HTMLAppletElement
archive [html] HTMLObjectElement
attrName [events] MutationEvent (read only)
author [pshop] DocumentInfo
authorPosition [pshop] DocumentInfo
axis [html] HTMLTableCellElement
azimuth [css] CSS2Properties
background [html] HTMLBodyElement
background [css] CSS2Properties
backgroundAttachment [css] CSS2Properties
backgroundColor [css] CSS2Properties
backgroundImage [css] CSS2Properties
backgroundPosition [css] CSS2Properties
backgroundRepeat [css] CSS2Properties
baseVal [svg] SVGAnimatedString
bgColor [html] HTMLTableElement
bgColor [html] HTMLTableRowElement
bgColor [html] HTMLBodyElement
bgColor [html] HTMLTableCellElement
border [html] HTMLImageElement
border [html] HTMLTableElement
border [css] CSS2Properties
border [html] HTMLObjectElement
borderBottom [css] CSS2Properties
borderBottomColor [css] CSS2Properties
borderBottomStyle [css] CSS2Properties
borderBottomWidth [css] CSS2Properties
borderCollapse [css] CSS2Properties
borderColor [css] CSS2Properties
borderLeft [css] CSS2Properties
borderLeftColor [css] CSS2Properties
borderLeftStyle [css] CSS2Properties
borderLeftWidth [css] CSS2Properties
borderRight [css] CSS2Properties
borderRightColor [css] CSS2Properties
borderRightStyle [css] CSS2Properties
borderRightWidth [css] CSS2Properties
borderSpacing [css] CSS2Properties
borderStyle [css] CSS2Properties
borderTop [css] CSS2Properties
borderTopColor [css] CSS2Properties
borderTopStyle [css] CSS2Properties
borderTopWidth [css] CSS2Properties
borderWidth [css] CSS2Properties
bottom [css] CSS2Properties
caption [pshop] DocumentInfo
captionSide [css] CSS2Properties
captionWriter [pshop] DocumentInfo
category [pshop] DocumentInfo
cellPadding [html] HTMLTableElement
cellSpacing [html] HTMLTableElement
ch [html] HTMLTableCellElement
ch [html] HTMLTableRowElement
ch [html] HTMLTableColElement
ch [html] HTMLTableSectionElement
charset [html] HTMLLinkElement
charset [html] HTMLAnchorElement
charset [html] HTMLScriptElement
chOff [html] HTMLTableRowElement
chOff [html] HTMLTableColElement
chOff [html] HTMLTableCellElement
chOff [html] HTMLTableSectionElement
cite [html] HTMLQuoteElement
cite [html] HTMLModElement
city [pshop] DocumentInfo
className [html] HTMLElement
clear [css] CSS2Properties
clear [html] HTMLBRElement
clip [css] CSS2Properties
code [html] HTMLObjectElement
code [html] HTMLAppletElement
codeBase [html] HTMLAppletElement
codeBase [html] HTMLObjectElement
codeType [html] HTMLObjectElement
color [html] HTMLFontElement
color [css] CSS2Properties
color [html] HTMLBaseFontElement
colorProfile [svg] SVGICCColor
colorProfileName [pshop] PhotoCDOpenOptions profile to use when reading the image
colorProfileName [pshop] Document name of color profile for document
cols [html] HTMLFrameSetElement
containerName [anark] Player (read only) Player type.
containerVersion [anark] Player (read only) Container version number.
content [html] HTMLMetaElement
content [css] CSS2Properties
contents [pshop] TextItem the text in the layer
contentScriptType [svg] SVGSVGElement
contentStyleType [svg] SVGSVGElement
cookie [html] HTMLDocument
coords [html] HTMLAnchorElement
coords [html] HTMLAreaElement
copyrightNotice [pshop] DocumentInfo
counterIncrement [css] CSS2Properties
counterReset [css] CSS2Properties
country [pshop] DocumentInfo
creationDate [pshop] DocumentInfo
creator [pshop] File (read only) The Macintosh file creator as a four-character string.
credit [pshop] DocumentInfo
cssFloat [css] CSS2Properties
cssText [css] CSSStyleDeclaration
cssText [css] CSSValue
cssText [css] CSSRule
cue [css] CSS2Properties
cueAfter [css] CSS2Properties
cueBefore [css] CSS2Properties
cursor [css] CSS2Properties
data [dom] CharacterData
data [html] HTMLObjectElement
data [dom] ProcessingInstruction
dateTime [html] HTMLModElement
defaultValue [html] HTMLInputElement
defaultValue [html] HTMLTextAreaElement
dir [html] HTMLElement
direction [css] CSS2Properties
display [css] CSS2Properties
domain [html] HTMLDocument (read only)
domain [svg] SVGDocument (read only)
elevation [css] CSS2Properties
emptyCells [css] CSS2Properties
encoding [css] CSSCharsetRule
encoding [pshop] File The encoding of the file for read/write operations.
enctype [html] HTMLFormElement
error [pshop] File The last file system error.
error [pshop] Folder The last file system error.
event [html] HTMLScriptElement
face [html] HTMLBaseFontElement
face [html] HTMLFontElement
font [pshop] TextItem text face of the character
font [css] CSS2Properties
fontFamily [css] CSS2Properties
fontSize [css] CSS2Properties
fontSizeAdjust [css] CSS2Properties
fontStretch [css] CSS2Properties
fontStyle [css] CSS2Properties
fontVariant [css] CSS2Properties
fontWeight [css] CSS2Properties
format [svg] SVGGlyphRefElement
format [svg] SVGAltGlyphElement
frame [html] HTMLTableElement
frameBorder [html] HTMLFrameElement
frameBorder [html] HTMLIFrameElement
fsName [pshop] Folder (read only) The file-system-specific name of this Folder as a full path name.
fsName [pshop] File (read only) The file-system-specific name of this File as a full path name.
glyphRef [svg] SVGGlyphRefElement
glyphRef [svg] SVGAltGlyphElement
headers [html] HTMLTableCellElement
headline [pshop] DocumentInfo
height [html] HTMLTableCellElement
height [css] CSS2Properties
height [html] HTMLAppletElement
height [html] HTMLObjectElement
height [html] HTMLIFrameElement
hexValue [pshop] RGBColor hex representation of this color
href [html] HTMLLinkElement
href [html] HTMLAnchorElement
href [html] HTMLBaseElement
href [html] HTMLAreaElement
href [css] CSSImportRule (read only)
href [stylesheets] StyleSheet (read only)
hreflang [html] HTMLLinkElement
hreflang [html] HTMLAnchorElement
htmlFor [html] HTMLLabelElement
htmlFor [html] HTMLScriptElement
httpEquiv [html] HTMLMetaElement
id [html] HTMLElement
id [svg] SVGElement
identifier [css] Counter (read only)
instructions [pshop] DocumentInfo
internalSubset [dom] DocumentType (read only)
jobName [pshop] DocumentInfo
label [html] HTMLOptGroupElement
label [html] HTMLOptionElement
lang [html] HTMLElement
left [css] CSS2Properties
letterSpacing [css] CSS2Properties
lineFeed [pshop] File The line feed character(s) used.
lineHeight [css] CSS2Properties
link [html] HTMLBodyElement
listStyle [css] Counter (read only)
listStyle [css] CSS2Properties
listStyleImage [css] CSS2Properties
listStylePosition [css] CSS2Properties
listStyleType [css] CSS2Properties
local [svg] SVGColorProfileElement
localName [dom] Node (read only)
longDesc [html] HTMLImageElement
longDesc [html] HTMLIFrameElement
longDesc [html] HTMLFrameElement
margin [css] CSS2Properties
marginBottom [css] CSS2Properties
marginHeight [html] HTMLFrameElement
marginHeight [html] HTMLIFrameElement
marginLeft [css] CSS2Properties
marginRight [css] CSS2Properties
marginTop [css] CSS2Properties
marginWidth [html] HTMLIFrameElement
marginWidth [html] HTMLFrameElement
markerOffset [css] CSS2Properties
marks [css] CSS2Properties
maxHeight [css] CSS2Properties
maxWidth [css] CSS2Properties
media [svg] SVGStyleElement
media [html] HTMLStyleElement
media [html] HTMLLinkElement
mediaText [stylesheets] MediaList
method [html] HTMLFormElement
minHeight [css] CSS2Properties
minWidth [css] CSS2Properties
name [html] HTMLImageElement
name [pshop] LayerSet the name of the layer
name [html] HTMLButtonElement
name [pshop] HistoryState (read only) the channel's name
name [html] HTMLInputElement
name [pshop] PICTResourceSaveOptions name of PICT resource
name [html] HTMLSelectElement
name [html] HTMLAnchorElement
name [pshop] Document (read only) the document's name
name [html] HTMLMetaElement
name [html] HTMLTextAreaElement
name [pshop] Channel the channel's name
name [pshop] File (read only) The name of the File without the path specification.
name [html] HTMLObjectElement
name [pshop] ArtLayer the name of the layer
name [pshop] Application (read only) The application's name
name [html] HTMLFormElement
name [pshop] Folder (read only) The name of the Folder without the path specification.
name [dom] DocumentType (read only)
name [dom] Attr (read only)
name [anark] Asset User-defined name for the asset.
name [html] HTMLIFrameElement
name [html] HTMLFrameElement
name [html] HTMLParamElement
name [svg] SVGColorProfileRule
name [svg] SVGColorProfileElement
name [html] HTMLAppletElement
name [html] HTMLMapElement
namespaceURI [dom] Node (read only)
newValue [events] MutationEvent (read only)
nodeName [dom] Node (read only)
nodeValue [dom] Node
notationName [dom] Entity (read only)
object [html] HTMLAppletElement
orphans [css] CSS2Properties
outline [css] CSS2Properties
outlineColor [css] CSS2Properties
outlineStyle [css] CSS2Properties
outlineWidth [css] CSS2Properties
overflow [css] CSS2Properties
ownerUrl [pshop] DocumentInfo
padding [css] CSS2Properties
paddingBottom [css] CSS2Properties
paddingLeft [css] CSS2Properties
paddingRight [css] CSS2Properties
paddingTop [css] CSS2Properties
page [css] CSS2Properties
pageBreakAfter [css] CSS2Properties
pageBreakBefore [css] CSS2Properties
pageBreakInside [css] CSS2Properties
path [pshop] Folder (read only) The path portion of the absoluteURI.
path [pshop] File (read only) The path portion of the absoluteURI.
pathName [pshop] ExportOptionsIllustrator name of path to export
pathSegTypeAsLetter [svg] SVGPathSeg (read only)
patternName [pshop] BitmapConversionOptions (only valid for 'custom pattern' conversions)
pause [css] CSS2Properties
pauseAfter [css] CSS2Properties
pauseBefore [css] CSS2Properties
pitch [css] CSS2Properties
pitchRange [css] CSS2Properties
platform [anark] Player (read only) Mac/Win OS.
platformVersion [anark] Player (read only) OS version.
playDuring [css] CSS2Properties
position [css] CSS2Properties
prefix [dom] Node
preserveAspectRatioString [svg] SVGViewSpec (read only)
prevValue [events] MutationEvent (read only)
profile [html] HTMLHeadElement
prompt [html] HTMLIsIndexElement
provinceState [pshop] DocumentInfo
publicId [dom] Notation (read only)
publicId [dom] DocumentType (read only)
publicId [dom] Entity (read only)
quotes [css] CSS2Properties
referrer [html] HTMLDocument (read only)
referrer [svg] SVGDocument (read only)
rel [html] HTMLLinkElement
rel [html] HTMLAnchorElement
relativeURI [pshop] Folder (read only) The path name for the Folder in URI notation, relative to the current folder.
relativeURI [pshop] File (read only) The path name for the File in URI notation, relative to the current folder.
remoteSource [anark] Image URL to the source for the image.
remoteSource [anark] Music (read only) URL to the source for the music.
remoteSource [anark] Video (read only) URL to the source for the video.
rev [html] HTMLLinkElement
rev [html] HTMLAnchorElement
richness [css] CSS2Properties
right [css] CSS2Properties
rows [html] HTMLFrameSetElement
rules [html] HTMLTableElement
scheme [html] HTMLMetaElement
scope [html] HTMLTableCellElement
scriptingVersion [pshop] Application (read only) The version of the Scripting interface
scrolling [html] HTMLFrameElement
scrolling [html] HTMLIFrameElement
selectorText [css] CSSPageRule
selectorText [css] CSSStyleRule
separator [css] Counter (read only)
serialNumber [pshop] Application (read only) The serial number of Photoshop
shape [html] HTMLAnchorElement
shape [html] HTMLAreaElement
size [html] HTMLFontElement
size [html] HTMLHRElement
size [css] CSS2Properties
source [pshop] DocumentInfo
source RegExp (read only) The regular expression expressed as a string.
speak [css] CSS2Properties
speakHeader [css] CSS2Properties
speakNumeral [css] CSS2Properties
speakPunctuation [css] CSS2Properties
speechRate [css] CSS2Properties
src [html] HTMLIFrameElement
src [html] HTMLInputElement
src [html] HTMLScriptElement
src [svg] SVGColorProfileRule
src [html] HTMLImageElement
src [html] HTMLFrameElement
standby [html] HTMLObjectElement
stress [css] CSS2Properties
summary [html] HTMLTableElement
systemId [dom] DocumentType (read only)
systemId [dom] Entity (read only)
systemId [dom] Notation (read only)
tableLayout [css] CSS2Properties
tagName [dom] Element (read only)
target [html] HTMLAnchorElement
target [html] HTMLFormElement
target [html] HTMLLinkElement
target [dom] ProcessingInstruction (read only)
target [html] HTMLAreaElement
target [html] HTMLBaseElement
text [html] HTMLOptionElement (read only)
text [html] HTMLScriptElement
text [html] HTMLTitleElement
text [html] HTMLBodyElement
textAlign [css] CSS2Properties
textDecoration [css] CSS2Properties
textIndent [css] CSS2Properties
textShadow [css] CSS2Properties
textTransform [css] CSS2Properties
title [html] HTMLElement
title [html] HTMLDocument
title [svg] SVGStyleElement
title [svg] SVGDocument (read only)
title [pshop] DocumentInfo
title [stylesheets] StyleSheet (read only)
top [css] CSS2Properties
transformString [svg] SVGViewSpec (read only)
transmissionReference [pshop] DocumentInfo
type [html] HTMLButtonElement (read only)
type [svg] SVGStyleElement
type [svg] SVGScriptElement
type [anark] Scene (read only) The string 'Scene'.
type [anark] Asset (read only) Type of the asset.
type [pshop] File (read only) The Macintosh file type as a four-character string.
type [events] Event (read only)
type [stylesheets] StyleSheet (read only)
type [html] HTMLScriptElement
type [html] HTMLParamElement
type [html] HTMLObjectElement
type [html] HTMLAnchorElement
type [html] HTMLLIElement
type [html] HTMLOListElement
type [html] HTMLUListElement
type [html] HTMLTextAreaElement (read only)
type [html] HTMLInputElement
type [html] HTMLLinkElement
type [html] HTMLSelectElement (read only)
type [html] HTMLStyleElement
typename [pshop] TargaSaveOptions (read only)
typename [pshop] BitmapConversionOptions (read only)
typename [pshop] CMYKColor (read only)
typename [pshop] Channel (read only)
typename [pshop] Channels (read only)
typename [pshop] DCS1_SaveOptions (read only)
typename [pshop] DCS2_SaveOptions
typename [pshop] Document (read only)
typename [pshop] DocumentInfo (read only)
typename [pshop] Documents (read only)
typename [pshop] EPSOpenOptions (read only)
typename [pshop] EPSSaveOptions (read only)
typename [pshop] ExportOptionsIllustrator (read only)
typename [pshop] GIFSaveOptions (read only)
typename [pshop] GrayColor (read only)
typename [pshop] HSBColor (read only)
typename [pshop] HistoryState (read only)
typename [pshop] HistoryStates (read only)
typename [pshop] IndexedConversionOptions (read only)
typename [pshop] JPEGSaveOptions (read only)
typename [pshop] LabColor (read only)
typename [pshop] LayerSet (read only)
typename [pshop] LayerSets (read only)
typename [pshop] Layers (read only)
typename [pshop] PDFOpenOptions (read only)
typename [pshop] PDFSaveOptions (read only)
typename [pshop] PICTFileSaveOptions (read only)
typename [pshop] PICTResourceSaveOptions (read only)
typename [pshop] PNGSaveOptions (read only)
typename [pshop] PhotoCDOpenOptions (read only)
typename [pshop] PhotoshopSaveOptions (read only)
typename [pshop] PixarSaveOptions (read only)
typename [pshop] Preferences (read only)
typename [pshop] RGBColor (read only)
typename [pshop] RawFormatOpenOptions (read only)
typename [pshop] RawSaveOptions (read only)
typename [pshop] SGIRGBSaveOptions (read only)
typename [pshop] Selection (read only)
typename [pshop] SolidColor (read only)
typename [pshop] TextItem (read only)
typename [pshop] TiffSaveOptions (read only)
typename [pshop] Application (read only)
typename [pshop] ArtLayers (read only)
typename [pshop] ActionDescriptor (read only)
typename [pshop] ActionList (read only)
typename [pshop] ActionReference (read only)
typename [pshop] ArtLayer (read only)
typename [pshop] BMPSaveOptions (read only)
unicodeBidi [css] CSS2Properties
uri [svg] SVGPaint (read only)
URL [svg] SVGDocument (read only)
URL [html] HTMLDocument (read only)
useMap [html] HTMLImageElement
useMap [html] HTMLInputElement
useMap [html] HTMLObjectElement
vAlign [html] HTMLTableCellElement
vAlign [html] HTMLTableSectionElement
vAlign [html] HTMLTableColElement
vAlign [html] HTMLTableRowElement
value [html] HTMLSelectElement
value [html] HTMLButtonElement
value [html] HTMLOptionElement
value [html] HTMLParamElement
value [html] HTMLTextAreaElement
value [html] HTMLInputElement
value [dom] Attr
valueAsString [svg] SVGAngle
valueAsString [svg] SVGLength
valueType [html] HTMLParamElement
version [html] HTMLHtmlElement
version [d3] d3 The version number of D3 being run.
version [anark] Player (read only) Version number.
version [pshop] Application (read only) The version of Adobe Photoshop application
verticalAlign [css] CSS2Properties
viewBoxString [svg] SVGViewSpec (read only)
viewTargetString [svg] SVGViewSpec (read only)
visibility [css] CSS2Properties
vLink [html] HTMLBodyElement
voiceFamily [css] CSS2Properties
volume [css] CSS2Properties
whiteSpace [css] CSS2Properties
widows [css] CSS2Properties
width [html] HTMLTableCellElement
width [html] HTMLIFrameElement
width [html] HTMLHRElement
width [css] CSS2Properties
width [html] HTMLObjectElement
width [html] HTMLAppletElement
width [html] HTMLTableElement
width [html] HTMLTableColElement
wordSpacing [css] CSS2Properties
xmlbase [svg] SVGElement
xmllang [svg] SVGLangSpace
xmlspace [svg] SVGLangSpace
xmlspace [svg] SVGStyleElement
zIndex [css] CSS2Properties

Methods that return a String

name of object description
appendItem(newItem) SVGStringList
charAt(pos) String Return the character at a particular index in the string.
concat([string1],[string2],[...]) String Append one or more strings to the current string, and return the result.
decode(str) Folder Decode the input string according to RFC 2396.
decode(str) File Decode the input string according to RFC 2396.
encode(str) Folder Encode the input string according to RFC 2396.
encode(str) File Encode the input string according to RFC 2396.
fromCharCode([charCode0],[charCode1],[...]) String Create a new string from a series of Unicode character values.
getAttribute(name) Element
getAttributeNS(namespaceURI,localName) Element
getItem(index) SVGStringList
getName() ActionReference get name value for an ActionReference whose form is 'Name'
getPropertyPriority(propertyName) CSSStyleDeclaration
getPropertyValue(propertyName) CSSStyleDeclaration
getRelativeURI([basePath]) Folder Calculate the path relative to another.
getRelativeURI([basePath]) File Calculate the path relative to another.
getString(index) ActionList get the value of an item of type string
getString(key) ActionDescriptor get the value of a key of type string
getStringValue() CSSPrimitiveValue
html() Selection Get the innerHTML for a DOM element.
indexOf(searchString,[position]) String Find the offset of a substring within the string.
insert(tagName,beforeSelector) EnterSelection Create and insert new elements before existing ones, returning a selection of the new elements.
insert(tagName,beforeSelector) Selection Create and insert new elements before existing ones, returning a selection of the new elements.
insertItemBefore(newItem,index) SVGStringList
item(index) CSSStyleDeclaration
item(index) MediaList
join([separator]) Array Returns a string representation of the array, separated by the delimiter of your choice.
lastIndexOf(searchString,[position]) String The offset of a substring within the string.
property(name) Selection Get the value of a DOM property.
read([chars]) File Read the contents of the file.
readch() File Read a single character.
readln() File Read one line of text.
removeItem(index) SVGStringList
removeProperty(propertyName) CSSStyleDeclaration
replace(searchExpr,replaceExpr) String Find and replace values in a string, and return the changed string.
replaceItem(newItem,index) SVGStringList
slice(start,[end]) String Return a specified subsection of the string.
style(name) Selection Get the computed value of a CSS style property.
substring(start,[end]) String Return a specified subsection of the string.
substringData(offset,count) CharacterData
text() Selection Get the textContent for a DOM element.
toDateString() Date Return a string version of the date-only portion of the object.
toExponential([fractionDigits]) Number Return the number formatted in scientific notation, with one digit before the decimal point and a specified number of digits after.
toFixed([fractionDigits]) Number Return the number formatted with a specified number of digits after the decimal point.
toLocaleLowerCase() String Return a locale-specific lowercase version of the string.
toLocaleString() Object For most objects, the same as toString() unless explicitly overridden.
toLocaleUpperCase() String Return a locale-specific uppercase version of the string.
toLowerCase() String Return a lowercase version of the string.
toPrecision(precision) Number Return the number as a string in either in fixed or exponential notation, with the specified number of digits.
toString() Object Returns a string representation of the object.
toString([radix]) Number Return the number as a string converted to a specified base.
toTimeString() Date Return a string version of the time-only portion of the object.
toUpperCase() String Return an uppercase version of the string.
toUTCString() Date Returns a string form of the Date in a convenient, human-readable form in UTC.
typeIDToCharID(typeID) Application Convert from a runtime ID to a character ID.
typeIDToStringID(typeID) Application Convert from a runtime ID to a string ID.
valueOf() Object Returns the internal this value of the object.

Arguments that are a String

name in method of object description
... writeln(str1,[str2],[...]) [pshop] File
... concat([string1],[string2],[...]) String etc.
... write(str1,[str2],[...]) [pshop] File
action doAction(action,from) [pshop] Application
arg insertData(offset,arg) [dom] CharacterData
arg replaceData(offset,count,arg) [dom] CharacterData
arg appendData(arg) [dom] CharacterData
attrNameArg initMutationEvent(typeArg,canBubbleArg,cancelableArg,…) [events] MutationEvent
basePath getRelativeURI([basePath]) [pshop] File The path to calculate relative
basePath getRelativeURI([basePath]) [pshop] Folder The path to calculate relative
beforeSelector insert(tagName,beforeSelector) [d3] Selection A selector to find the element to insert the new element before.
beforeSelector insert(tagName,beforeSelector) [d3] EnterSelection A selector to find the element to insert the new element before.
charID charIDToTypeID(charID) [pshop] Application
commandLine launch(commandLine,flags) [anark] Container Application and file to launch
compareString localeCompare(compareString) String The string to compare to the c
creator open(mode,[type],[creator]) [pshop] File Four character MacOS creator t
data createProcessingInstruction(target,data) [dom] Document
data createTextNode([data]) [dom] Document The string contents of the tex
data createComment(data) [dom] Document
data createCDATASection(data) [dom] Document
dateString parse(dateString) Date The string to parse as a date;
destinationProfile convertProfile(destinationProfile,intent,[blackPointCompensation],…) [pshop] Document
easeParam1 ease(easeType,[easeParam1],[easeParam2]) [d3] Transition Additional parameter based on the easing function.
easeParam1 ease(easingType,[easeParam1],[easeParam2]) [d3] d3 Additional parameter based on the easing function.
easeParam2 ease(easingType,[easeParam1],[easeParam2]) [d3] d3 Additional parameter based on the easing function.
easeParam2 ease(easeType,[easeParam1],[easeParam2]) [d3] Transition Additional parameter based on the easing function.
easeType ease(easeType,[easeParam1],[easeParam2]) [d3] Transition Name of one of the predefined easing methods.
easingType ease(easingType,[easeParam1],[easeParam2]) [d3] d3 One of the predefined easing types.
elementId getElementById(elementId) [svg] SVGSVGElement
elementId getElementById(elementId) [dom] Document
elementName getElementsByName(elementName) [html] HTMLDocument
eventName on(eventName,eventHandler,capturePhase) [d3] Selection Name of the event, e.g. ‘click’ or ‘mouseover’. To register multiple handlers for the same type on the same element, use a trailing namespace, e.g. ‘click.foo’ and ‘click.bar’.
eventName on(eventName) [d3] Selection Name of the event, e.g. ‘click’ or ‘mouseover’.
eventType createEvent(eventType) [events] DocumentEvent A string denoting the type of<
eventTypeArg initEvent(eventTypeArg,canBubbleArg,cancelableArg) [events] Event Specifies the event type. This
extension hasExtension(extension) [svg] SVGTests
feature hasFeature(feature,version) [dom] DOMImplementation
feature isSupported(feature,version) [dom] Node
from doAction(action,from) [pshop] Application
iccColor setRGBColorICCColor(rgbColor,iccColor) [svg] SVGColor
iccColor setColor(colorType,rgbColor,iccColor) [svg] SVGColor
iccColor setPaint(paintType,uri,rgbColor,…) [svg] SVGPaint
localName removeNamedItemNS(namespaceURI,localName) [dom] NamedNodeMap
localName hasAttributeNS(namespaceURI,localName) [dom] Element
localName removeAttributeNS(namespaceURI,localName) [dom] Element
localName getAttributeNS(namespaceURI,localName) [dom] Element
localName getElementsByTagNameNS(namespaceURI,localName) [dom] Document
localName getElementsByTagNameNS(namespaceURI,localName) [dom] Element
localName getAttributeNodeNS(namespaceURI,localName) [dom] Element
localName getNamedItemNS(namespaceURI,localName) [dom] NamedNodeMap
mask getFiles([mask]) [pshop] Folder The search mask to use.
media createCSSStyleSheet(title,media) [css] DOMImplementationCSS
mode open(mode,[type],[creator]) [pshop] File One of 'r',
msg confirm(msg) [pshop] Application The confirmation message to di
msg alert(msg) [pshop] Application The message to display.
name setAttribute(name,value) [dom] Element
name getPresentationAttribute(name) [svg] SVGStylable
name createAttribute(name) [dom] Document
name createEntityReference(name) [dom] Document
name getNamedItem(name) [dom] NamedNodeMap
name removeNamedItem(name) [dom] NamedNodeMap
name getAttribute(name) [dom] Element
name removeAttribute(name) [dom] Element
name getAttributeNode(name) [dom] Element
name getElementsByTagName(name) [dom] Element
name hasAttribute(name) [dom] Element
name namedItem(name) [html] HTMLCollection
name namedItem(name) [html] HTMLOptionsCollection
name add([width],[height],[resolution],…) [pshop] Documents
name attr(name,value) [d3] Transition Name of the attribute to transition.
name attr(name,func) [d3] Transition Name of the attribute to transition.
name classed(name) [d3] Selection
name classed(name,setFlag) [d3] Selection
name classed(name,func) [d3] Selection
name style(name) [d3] Selection
name style(name,value,[priority]) [d3] Selection
name style(name,func,[priority]) [d3] Selection
name styleTween(name,tweenCalculator,[priority]) [d3] Transition Name of the CSS property to transition.
name tween(name,tweenCalculator) [d3] Transition A unique name for this tween operation.
name attrTween(name,tweenCalculator) [d3] Transition Name of the attribute to transition.
name style(name,value,[priority]) [d3] Transition Name of the CSS property to transition.
name style(name,func,[priority]) [d3] Transition Name of the CSS property to transition.
name attr(name) [d3] Selection
name attr(name,value) [d3] Selection
name attr(name,func) [d3] Selection
name property(name) [d3] Selection
name property(name,value,[priority]) [d3] Selection
name property(name,func) [d3] Selection
namespaceURI removeAttributeNS(namespaceURI,localName) [dom] Element
namespaceURI getNamedItemNS(namespaceURI,localName) [dom] NamedNodeMap
namespaceURI setAttributeNS(namespaceURI,qualifiedName,value) [dom] Element
namespaceURI createDocument(namespaceURI,qualifiedName,doctype) [dom] DOMImplementation
namespaceURI getAttributeNS(namespaceURI,localName) [dom] Element
namespaceURI getElementsByTagNameNS(namespaceURI,localName) [dom] Element
namespaceURI createElementNS(namespaceURI,qualifiedName) [dom] Document
namespaceURI createAttributeNS(namespaceURI,qualifiedName) [dom] Document
namespaceURI getElementsByTagNameNS(namespaceURI,localName) [dom] Document
namespaceURI hasAttributeNS(namespaceURI,localName) [dom] Element
namespaceURI getAttributeNodeNS(namespaceURI,localName) [dom] Element
namespaceURI removeNamedItemNS(namespaceURI,localName) [dom] NamedNodeMap
newHTML html(newHTML) [d3] Selection If this parameter is not a string it is forced to one.
newItem appendItem(newItem) [svg] SVGStringList
newItem insertItemBefore(newItem,index) [svg] SVGStringList
newItem replaceItem(newItem,index) [svg] SVGStringList
newMedium appendMedium(newMedium) [stylesheets] MediaList
newName rename(newName) [pshop] Folder The new name for the folder.
newName rename(newName) [pshop] File The new name for the file.
newText text(newText) [d3] Selection If this parameter is not a string it is forced to one.
newValueArg initMutationEvent(typeArg,canBubbleArg,cancelableArg,…) [events] MutationEvent
oldMaterialName swapMaterial(oldMaterialName,newMaterial) [anark] Model The name of the old material.<
oldMedium deleteMedium(oldMedium) [stylesheets] MediaList
prevValueArg initMutationEvent(typeArg,canBubbleArg,cancelableArg,…) [events] MutationEvent
printSpace print([postScriptEncoding],[sourceSpace],[printSpace],…) [pshop] Document
priority style(name,func,[priority]) [d3] Selection Either null or the string "important".
priority style(name,value,[priority]) [d3] Transition Either null or the string "important".
priority style(name,func,[priority]) [d3] Transition Either null or the string "important".
priority setProperty(propertyName,value,priority) [css] CSSStyleDeclaration
priority property(name,value,[priority]) [d3] Selection Either null or the string "important".
priority styleTween(name,tweenCalculator,[priority]) [d3] Transition Either null or the string "important".
priority style(name,value,[priority]) [d3] Selection Either null or the string "important".
propertyName getPropertyCSSValue(propertyName) [css] CSSStyleDeclaration
propertyName getPropertyPriority(propertyName) [css] CSSStyleDeclaration
propertyName removeProperty(propertyName) [css] CSSStyleDeclaration
propertyName setProperty(propertyName,value,priority) [css] CSSStyleDeclaration
propertyName getPropertyValue(propertyName) [css] CSSStyleDeclaration
propertyOrMethodName propertyIsEnumerable(propertyOrMethodName) Object The name of the property or me
propertyOrMethodName hasOwnProperty(propertyOrMethodName) Object The name of the property or me
pseudoElt getOverrideStyle(elt,pseudoElt) [css] DocumentCSS
pseudoElt getComputedStyle(elt,pseudoElt) [css] ViewCSS
publicId createDocumentType(qualifiedName,publicId,systemId) [dom] DOMImplementation
qualifiedName setAttributeNS(namespaceURI,qualifiedName,value) [dom] Element
qualifiedName createAttributeNS(namespaceURI,qualifiedName) [dom] Document
qualifiedName createElementNS(namespaceURI,qualifiedName) [dom] Document
qualifiedName createDocument(namespaceURI,qualifiedName,doctype) [dom] DOMImplementation
qualifiedName createDocumentType(qualifiedName,publicId,systemId) [dom] DOMImplementation
rgbColor setColor(colorType,rgbColor,iccColor) [svg] SVGColor
rgbColor setRGBColor(rgbColor) [svg] SVGColor
rgbColor setRGBColorICCColor(rgbColor,iccColor) [svg] SVGColor
rgbColor setPaint(paintType,uri,rgbColor,…) [svg] SVGPaint
rule insertRule(rule,index) [css] CSSStyleSheet
rule insertRule(rule,index) [css] CSSMediaRule
searchString lastIndexOf(searchString,[position]) String The substring to search for wi
searchString indexOf(searchString,[position]) String The substring to search for wi
selector selectAll(selector) [d3] Selection
selector select(selector) [d3] Selection
selector select(selector) [d3] d3
selector selectAll(selector) [d3] Transition
selector select(selector) [d3] Transition
selector selectAll(selector) [d3] d3
separator join([separator]) Array The string to separate each el
sourceString test(sourceString) RegExp The string to run the regular<
sourceString exec(sourceString) RegExp The string to run the regular<
str decode(str) [pshop] File The string to decode.
str eval(str) Global The string to evaluate.
str decode(str) [pshop] Folder The string to decode.
str encode(str) [pshop] Folder The string to encode.
str encode(str) [pshop] File The string to encode.
str1 write(str1,[str2],[...]) [pshop] File The first string to write.
str1 writeln(str1,[str2],[...]) [pshop] File The first string to write.
str2 writeln(str1,[str2],[...]) [pshop] File Additional string(s) to write.
str2 write(str1,[str2],[...]) [pshop] File Additional string(s) to write.
string parseFloat(string) Global The string to convert to a num
string parseInt(string,[radix]) Global The string to convert to a num
string1 concat([string1],[string2],[...]) String The first string to append.
string2 concat([string1],[string2],[...]) String The second string to append.
stringID stringIDToTypeID(stringID) [pshop] Application
stringValue setStringValue(stringType,stringValue) [css] CSSPrimitiveValue
styleName applyStyle(styleName) [pshop] ArtLayer
systemId createDocumentType(qualifiedName,publicId,systemId) [dom] DOMImplementation
tagname getElementsByTagName(tagname) [dom] Document
tagName insert(tagName,beforeSelector) [d3] EnterSelection May have a namespace prefix, such as svg:text to create a <text> element in the SVG namespace. By default, D3 supports svg, xhtml, xlink, xml and xmlns namespaces. Additional namespaces can be registered by adding to d3.ns.prefix.
tagName append(tagName) [d3] EnterSelection May have a namespace prefix, such as svg:text to create a <text> element in the SVG namespace. By default, D3 supports svg, xhtml, xlink, xml and xmlns namespaces. Additional namespaces can be registered by adding to d3.ns.prefix.
tagName insert(tagName,beforeSelector) [d3] Selection May have a namespace prefix, such as svg:text to create a <text> element in the SVG namespace. By default, D3 supports svg, xhtml, xlink, xml and xmlns namespaces. Additional namespaces can be registered by adding to d3.ns.prefix.
tagName createElement(tagName) [dom] Document
tagName append(tagName) [d3] Selection May have a namespace prefix, such as svg:text to create a <text> element in the SVG namespace. By default, D3 supports svg, xhtml, xlink, xml and xmlns namespaces. Additional namespaces can be registered by adding to d3.ns.prefix.
target createProcessingInstruction(target,data) [dom] Document
text writeln(text) [html] HTMLDocument
text text(text) [d3] Transition The new text contents; a null value will clear the content.
text write(text) [html] HTMLDocument
timeContextName getContext(timeContextName) [anark] Presentation Variable name of the TimeConte
title createCSSStyleSheet(title,media) [css] DOMImplementationCSS
type addEventListener(type,listener,useCapture) [events] EventTarget
type open(mode,[type],[creator]) [pshop] File Four character MacOS file type
type each([type],func) [d3] Transition Either “start” or “end”; if omitted the behavior is immediate, as with selection.each().
type removeEventListener(type,listener,useCapture) [events] EventTarget
typeArg initMutationEvent(typeArg,canBubbleArg,cancelableArg,…) [events] MutationEvent
typeArg initMouseEvent(typeArg,canBubbleArg,cancelableArg,…) [events] MouseEvent
typeArg initUIEvent(typeArg,canBubbleArg,cancelableArg,…) [events] UIEvent
uri setUri(uri) [svg] SVGPaint
uri setPaint(paintType,uri,rgbColor,…) [svg] SVGPaint
value putName([desiredClass],[value]) [pshop] ActionReference
value attr(name,value) [d3] Selection Non-string values (e.g. a number like 10) are coerced to strings before setting.
value putString(value) [pshop] ActionList
value setAttributeNS(namespaceURI,qualifiedName,value) [dom] Element
value setProperty(propertyName,value,priority) [css] CSSStyleDeclaration
value attr(name,value) [d3] Transition Non-string values (e.g. a number like 10) are coerced to strings before setting.
value style(name,value,[priority]) [d3] Transition If this parameter is not a string it is forced to one.
value setAttribute(name,value) [dom] Element
value property(name,value,[priority]) [d3] Selection If this parameter is not a string it is forced to one.
value style(name,value,[priority]) [d3] Selection If this parameter is not a string it is forced to one.
value putString(key,value) [pshop] ActionDescriptor
version hasFeature(feature,version) [dom] DOMImplementation
version isSupported(feature,version) [dom] Node