A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/arcade/function-reference/text_functions/ below:

Text functions | ArcGIS Arcade

Functions for formatting text values. These are commonly used in the labeling and popup profiles.

Concatenate Concatenate(values?, separator?, format?) -> Text

Since version 1.0

Function bundle: Core

Concatenates values together and returns a text value.

Parameters

Return value: Text

Example

prints 'red/blue/green'

Use dark colors for code blocks Copy

1
Concatenate(['red', 'blue', 'green'], '/')
Count Count(value) -> Number

Since version 1.0

Function bundle: Core

Returns the number of characters in a text value.

Parameter

Return value: Number

Example

Returns 13

Use dark colors for code blocks Copy

Find Find(searchText, targetText, startPosition?) -> Number

Since version 1.0

Function bundle: Core

Finds a sequence of characters within a text value. Wildcards are NOT supported. A returned value of -1 indicates no results were found.

Parameters

Return value: Number

Example

prints 6

Use dark colors for code blocks Copy

1
Find('380', 'Esri, 380 New York Street', 0)
FromCharCode FromCharCode(charCode1, [charCode2, ..., charCodeN]?) -> Text

Since version 1.16

Function bundle: Core

Returns a text value created from a sequence of UTF-16 character codes.

Parameters

Return value: Text

Examples

The following example returns 'XYZ'

Use dark colors for code blocks Copy

1
2
FromCharCode(88,89,90)
// returns 'XYZ'

The following example returns '🌉'

Use dark colors for code blocks Copy

1
2
FromCharCode(55356, 57097)
// returns '🌉'
FromCodePoint FromCodePoint(codePoint1, [codePoint2, ..., codePoint1N]?) -> Text

Since version 1.16

Function bundle: Core

Returns a text value created from a sequence of UTF-32 code points.

Parameters

Return value: Text

Examples

The following example returns 'XYZ'

Use dark colors for code blocks Copy

1
2
FromCodePoint(88,89,90)
// returns 'XYZ'

The following example returns '🌉'

Use dark colors for code blocks Copy

1
2
FromCodePoint(127753)
// returns '🌉'
Guid Guid(guidFormat?) -> Text

Since version 1.3

Function bundle: Core

Returns a random GUID as a text value.

Parameter

Return value: Text

Examples

Returns a value similar to {db894515-ed21-4df1-af67-36232256f59a}

Use dark colors for code blocks Copy

Returns a value similar to d00cf4dffb184caeb8ed105b2228c247

Use dark colors for code blocks Copy

Left Left(value, charCount) -> Text

Since version 1.0

Function bundle: Core

Returns the specified number of characters from the beginning of a text value.

Parameters

Return value: Text

Example

prints 'the'

Use dark colors for code blocks Copy

1
Left('the quick brown fox', 3)
Lower Lower(inputText) -> Text

Since version 1.0

Function bundle: Core

Makes a text value lower case.

Parameter

Return value: Text

Example

prints 'hello'

Use dark colors for code blocks Copy

Mid Mid(value, startPosition, charCount?) -> Text

Since version 1.0

Function bundle: Core

Gets a number of characters from the middle of a text value.

Parameters

Return value: Text

Example

prints 'quick'

Use dark colors for code blocks Copy

1
Mid('the quick brown fox', 4, 5)
Proper Proper(inputText, applyToText?) -> Text

Since version 1.0

Function bundle: Core

Converts a text value to title case. By default, the beginning of every word is capitalized. The option firstword will capitalize only the first word.

Parameters

Return value: Text

Example

prints 'The Quick Brown Fox'

Use dark colors for code blocks Copy

1
Proper('the quick brown fox', 'everyword')
Replace Replace(value, searchText, replacementText, allOccurrences?) -> Text

Since version 1.0

Function bundle: Core

Replaces characters within a text value. Defaults to replacing all occurrences.

Parameters

Return value: Text

Example

prints 'the quick red fox'

Use dark colors for code blocks Copy

1
Replace('the quick brown fox', 'brown', 'red')
Right Right(value, charCount) -> Text

Since version 1.0

Function bundle: Core

Returns the specified number of characters from the end of a text value.

Parameters

Return value: Text

Example

prints 'fox'

Use dark colors for code blocks Copy

1
Right('the quick brown fox', 3)
Split Split(inputText, separatorText, limit?, removeEmpty?) -> Array<Text>

Since version 1.0

Function bundle: Core

Splits a text value into an array.

Parameters

Return value: Array<Text>

Examples

returns '[red,green]'

Use dark colors for code blocks Copy

1
Split('red,green,blue,orange', ',', 2)

Splits the paragraph at each space an unlimited number of times. Returns an array of the words in the paragraph.

Use dark colors for code blocks Copy

1
Split(paragraph, ' ', -1, true)
StandardizeFilename StandardizeFilename(inputFilename) -> Text

Since version 1.29

Function bundle: Core

Returns a standardized, formatted filename based on the following character substitution rules. The field value characters will be returned in a standardized format as designated below.

Parameter

Return value: Text

Example

Use dark colors for code blocks Copy

1
2
3
var rawFilename = "USGS:Green River, Utah";
return StandardizeFilename(rawFilename);
// Returns a value of "USGS, Green River, Utah".
StandardizeGuid StandardizeGuid(inputGuid, format) -> Text

Since version 1.20

Function bundle: Core

Returns a standardized, formatted GUID string.

Parameters

Return value: Text

Examples

Converts a GUID to digits format

Use dark colors for code blocks Copy

1
2
StandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits')
// Returns a value of 4e6f776dc2984b4b86a457103b4d0f4a

Converts a GUID to digits-hyphen format

Use dark colors for code blocks Copy

1
2
StandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits-hyphen')
// Returns a value of 4e6f776d-c298-4b4b-86a4-57103b4d0f4a
Text Text(value, format?) -> Text

Since version 1.0

Function bundle: Core

Converts any value into a text value. An optional format parameter is provided to allow for formatting date and number data inputs. Returns null if an equivalent text conversion cannot be determined.

Parameters

Return value: Text

Examples

Pad the number to the left of the decimal

Use dark colors for code blocks Copy

1
Text(123, '0000') // '0123'

Restrict the number to the left of the decimal

Use dark colors for code blocks Copy

1
Text(123, '00') // '23'

Group the number by thousands

Use dark colors for code blocks Copy

1
Text(1234, '#,###') // '1,234'

Round the number to two decimal places

Use dark colors for code blocks Copy

1
Text(12345678.123, '#,###.00') // '12,345,678.12'

Format number as currency

Use dark colors for code blocks Copy

1
Text(1234.55, '$#,###.00') // '$1,234.55'

Round the number to two decimal places

Use dark colors for code blocks Copy

1
Text(1.236, '#.00') // '1.24'

Maintain significant digits and group by thousands

Use dark colors for code blocks Copy

1
Text(1234.5678, '#,##0.00#') // '1,234.568'

Format the number and format positive/negative - if there is a negative subpattern, it serves only to specify the negative prefix and suffix

Use dark colors for code blocks Copy

1
Text(-2, 'Floor #;Basement #') // 'Basement 2'

Use dark colors for code blocks Copy

1
Text(2, 'Floor #;Basement #') // 'Floor 2'

Multiply by 100 and format as percentage

Use dark colors for code blocks Copy

1
Text(0.3, '#%') // '30%'

Format date and time at the moment. eg 'Tuesday, October 25, 2016 @ 08:43:11'

Use dark colors for code blocks Copy

1
Text(Now(), 'dddd, MMMM D, Y @ h:m:s')

Formats the date and time with the timezone

Use dark colors for code blocks Copy

1
2
Text(startDate, 'ddd, MMM D, Y h:mm:ss A ZZZZ')
// returns Thu, Sep 14, 2023 10:04:49 AM PDT
ToCharCode ToCharCode(inputText, index?) -> Number

Since version 1.16

Function bundle: Core

Returns a number between 0 and 65535 representing the UTF-16 code unit at the given index. Invalid halves of surrogate pairs are automatically removed.

Parameters

Return value: Number

Examples

The following example returns 88, the Unicode value for X.

Use dark colors for code blocks Copy

1
2
ToCharCode('XYZ')
// returns 88

The following example returns 89, the Unicode value for Y.

Use dark colors for code blocks Copy

1
2
ToCharCode('XYZ', 1)
// returns 89

The following example returns 65535.

Use dark colors for code blocks Copy

1
2
ToCharCode('\uFFFF\uFFFE')
// returns 65535

The following example returns 55356.

Use dark colors for code blocks Copy

1
2
ToCharCode('🌉')
// returns 55356

The following example returns 57097.

Use dark colors for code blocks Copy

1
2
ToCharCode('🌉', 1)
// returns 57097
ToCodePoint ToCodePoint(inputText, position?) -> Number

Since version 1.16

Function bundle: Core

Returns a non-negative number representing the UTF-32 code point value of the input text. If indexed into the first half of a surrogate pair, the whole code point is returned. If indexed into the second half of the pair, this function returns the value of the second half. If a large code isn't a valid character, the function returns only the value of the half it indexes into.

Parameters

Return value: Number

Examples

The following example returns 88, the Unicode value for X.

Use dark colors for code blocks Copy

1
2
ToCodePoint('XYZ')
// returns 88

The following example returns 89, the Unicode value for Y.

Use dark colors for code blocks Copy

1
2
ToCodePoint('XYZ', 1)
// returns 89

The following example returns 127753.

Use dark colors for code blocks Copy

1
2
ToCodePoint('🌉')
// returns 127753

The following example returns 57097.

Use dark colors for code blocks Copy

1
2
ToCodePoint('🌉', 1)
// returns 57097
ToHex ToHex(value) -> Text

Since version 1.12

Function bundle: Core

Converts an integer to a hexidecimal representation.

Parameter

Return value: Text

Examples

Returns "64".

Use dark colors for code blocks Copy

Returns the hexidecimal representation for the color royal blue, "#4169E1", from its RGB values

Use dark colors for code blocks Copy

1
2
3
4
5
var r = ToHex(65); // returns "41"
var g = ToHex(105); // returns "69"
var b = ToHex(225); // returns "E1"
Concatenate("#",r,g,b)
// Returns "#4169E1"
Trim Trim(inputText) -> Text

Since version 1.0

Function bundle: Core

Removes spaces from the beginning or end of an input text value.

Parameter

Return value: Text

Example

prints 'hello world'

Use dark colors for code blocks Copy

Upper Upper(inputText) -> Text

Since version 1.0

Function bundle: Core

Makes text upper case.

Parameter

Return value: Text

Example

prints 'HELLO'

Use dark colors for code blocks Copy

UrlEncode UrlEncode(textOrDictionary) -> Text

Since version 1.7

Function bundle: Core

Encodes a URL by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.

Parameter

Return value: Text

Example

Encodes the URL provided

Use dark colors for code blocks Copy

1
2
3
4
5
6
7
var urlsource ='arcgis-survey123://?';
var params = {
  itemID:'36ff9e8c13e042a58cfce4ad87f55d19',
  center: '43.567,-117.380'
};
return urlsource  + UrlEncode(params);
//arcgis-survey123://?center=43.567%2C-117.380&itemID=36ff9e8c13e042a58cfce4ad87f55d19

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4