// This module is included in the following assemblies:
// as_mapping-data.adoc

[id='available-transformations_{context}']
= Descriptions of available transformations

The following table describes the available transformations. The date and
number types refer generically to any of the various forms of these 
concepts. That is, number includes, for example, `integer`, `long`, `double`.
Date includes, for example, `date`, `Time`, `ZonedDateTime`.

|===
|Transformation  |Input Type |Output Type |Parameter (* = required) |Description

|`AbsoluteValue`
|number
|number
|None
|Return the absolute value of a number.

// | `Add`
// | collection, array, or map
// | number
// | None
// | Add the numbers in the set's values. 

| `AddDays`
| date
| date
| `days`
| Add days to a date. The default is 0 days. 

| `AddSeconds`
| date
| date
| `seconds`
| Add seconds to a date. The default is 0 seconds. 

| `Append`
| string
| string
| string
| Append a string to the end of a string. The default is to append nothing. 

// | `Average`
// | collection, array, or map
// | number
// | None
// | Return the average of the numbers in the set. 

| `Camelize`
| string
| string
| None
| Convert a phrase to a camelized string by removing whitespace, making
the first word lowercase, and capitalizing the first letter of each
subsequent word. 

|`Capitalize`
|string
|string
| None
|Capitalize the first character in a string.

| `Ceiling`
| number
| number
| None
| Return the whole number ceiling of a number.

// |`Concatenate`
// | collection, array, or set
// | string
// | `delimiter`
// | Concatenate the values in a set by separating them with the delimiter if
// it is specified. 

| `Contains`
| any
| Boolean
| `value`
| Return true if a field contains the specified value.

| `CopyTo`
| any simple type
| any simple type in an array
| index*
| For a collection, copy the value of a string field into a specified field of a target collection without splitting. The index parameter defines the index of the field in the target collection. The default is `0` (the first field in the target collection). 

| `ConvertAreaUnit`
| number
| number
| `fromUnit`*

`toUnit` *
| Convert a number that represents an area to another unit. For 
the `fromUnit` and `toUnit` parameters, select the appropriate unit
from the *From Unit* and *To Unit* menus. The choices are:
`Square Foot`, `Square Meter`, or `Square Mile`.

|`ConvertDistanceUnit`
| number
| number
| `fromUnit` *

`toUnit` *
| Convert a number that represents a distance to another unit. For the
`fromUnit` and `toUnit` parameters, select the appropriate unit
from the *From Unit* and *To Unit* menus. The choices are: 
`Foot`, `Inch`, `Meter`, `Mile`, or `Yard`.

| `ConvertMassUnit`
| number
| number
| `fromUnit` *

`toUnit` *
| Convert a number that represents mass to another unit. For the
`fromUnit` and `toUnit` parameters, select the appropriate unit
from the *From Unit* and *To Unit* menus. The choices are: 
`Kilogram` or `Pound`. 

|`ConvertVolumeUnit`
| number
| number
| `fromUnit` *

`toUnit` *
| Convert a number that represents volume to another unit. For the 
`fromUnit` and `toUnit` parameters, select the appropriate unit
from the *From Unit* and *To Unit* menus. The choices are:
`Cubic Foot`, `Cubic Meter`, `Gallon US Fluid`, or `Liter`.

// |`CurrentDate`
// |None
// |date
// |None
// |Return the current date.

// |`CurrentDateTime`
// |None
// |date
// |None
// |Return the current date and time.

// |`CurrentTime`
// |None
// |date
// |None
// |Return the current time.

|`DayOfWeek`
| date
| number
| None
| Return the day of the week (1 through 7) that corresponds to the date.

|`DayOfYear`
| date
| number
| None
| Return the day of the year (1 through 366) that corresponds to the date. 

// |`Divide`
// | collection, array, or map
// | number
// | None
// | For each value in a set, divide it by the next value in the set. 
// For a normal division operation, there are two values in the set. 

|`EndsWith`
| string
| Boolean
| `string`
| Return true if a string ends with the specified `string` 
and the case is the same in both strings. 

|`Equals`
| any
| Boolean
| `value`
| Return true if the input field is equal to the specified `value` 
and the case is the same in the field and in the value.

|`FileExtension`
| string
| string
| None
| From a string that represents a file name, return the file extension
without the dot. 

|`Floor`
| number
| number
| None
| Return the whole number floor of a number. 

|`Format`
| any
| string
| `template` *
| In `template`, replace each placeholder (such as `%s`) with the value of the 
input field and return a string that contains the result. This
is similar to mechanisms that are available in programming languages such
as Java and C. 

// |`GenerateUUID`
// |None
// |string
// |None
// |Create a string that represents a random UUID.

|`IndexOf`
| string +
The first character is at index 0. 
| number
| `string` +
Search the input string for this string.
| Return the index of the character in the input string 
that is the parameter string's first character.
Return `-1` if the parameter string is not found. 

|`IsNull`
| any
| Boolean
| None
| Return true if a field is null.

|`LastIndexOf`
| string +
The first character is at index 0.
| number
| `string` +
Search the input string for this string.
| Return the index of the character in the input string 
that is the parameter string's last character.
Return `-1` if the parameter string is not found. 

|`Length`
| any
| number
| None
| Return the length of the field, or `-1` if the field is null.
// For a collection, return the number of entries. 

|`Lowercase`
|string
|string
|None
|Convert a string to lowercase.

// | `Maximum`
// | collection, array, or map
// | number
// | None
// | Return the highest number that is in the set.

// | `Minimum`
// | collection, array, or map
// | number
// | None
// | Return the lowest number that is in the set.

// | `Multiply`
// | collection, array, or map
// | number
// | None
// | Multiply the numbers in a set. 

| `Normalize`
| string
| string
| None
| Replace consecutive whitespace characters with a single space and trim
leading and trailing whitespace from a string.

|`PadStringLeft`
|string
|string
|`padCharacter` *

`padCount` *
|Insert the character supplied in `padCharacter` at the beginning of a
string. Do this the number of times specified in `padCount`.

|`PadStringRight`
|string
|string
|`padCharacter` *

`padCount` *
|Insert the character supplied in `padCharacter` at the end of a
string. Do this the number of times specified in `padCount`.

| `Prepend`
| string
| string
| `string`
| Prefix `string` to the beginning of a string. the default is to prepend
nothing. 

|`ReplaceAll`
|string
|string
|`match` * 

`newString`
| In a string, replace all occurrences of the supplied matching string with the
supplied `newString`. The default `newString` is an empty string.

| `ReplaceFirst`
| string
| string
| `match` *

`newString` *
| In a string, replace the first occurrence of the specified `match` string
with the specified `newString`. The default `newString` is an empty string.

| `Repeat`
| any simple type
| any simple type in an array
| `count` * (Required when the source field is _not_ in an array)
| When mapping a simple type to an array type, fill multiple array elements with the value taken from the simple type.

| `Round`
| number
| number
| None
| Return the rounded whole number of a number.

|`SeparateByDash`
|string
|string
|None
|Replace each occurrence of whitespace, colon (:), underscore (_),
plus (+), and equals (=) with a hyphen (-).

|`SeparateByUnderscore`
|string
|string
|None
|Replace each occurrence of whitespace, colon (:), hyphen (-), plus (+),
and equals (=) with an underscore (_).

| `Split`
| compound type
| any
| None
| Separate a compound source field into multiple target fields based on a delimiter in the source compound field. The default delimiter is a space.

| `StartsWith`
| string
| Boolean
| `string`
| Return true if a string starts with the specified string (including case).

|`Substring`
|string
|string
|`startIndex` *

`endIndex`
|Retrieve a segment of a string from the specified inclusive `startIndex` to the
specified exclusive `endIndex`. Both indexes start at zero. `startIndex` is
inclusive. `endIndex` is exclusive. The default value of `endIndex` is the
length of the string.

|`SubstringAfter`
|string
|string
|`startIndex` *

`endIndex`

`match` *
|Retrieve the segment of a string after the specified `match` string from the
specified inclusive `startIndex` to the specified exclusive `endIndex`.
Both indexes start at zero. The default value of `endIndex` is the length of the
string after the supplied `match` string.

|`SubstringBefore`
|string
|string
|`startIndex` *

`endIndex`

`match` *
|Retrieve a segment of a string before the supplied `match` string
from the supplied inclusive `startIndex` to the supplied exclusive
`endIndex`. Both indexes start at zero. The default value of `endIndex` is the
length of the string before the supplied `match` string.

// | `Subtract`
// | collection, array, or set
// | number
// | None
// | Return the result of subtracting each entry in the set from its previous entry. 
// A normal `Subtract` transform operates on a set that has two values.

|`Trim`
|string
|string
|None
|Trim leading and trailing whitespace from a string.

|`TrimLeft`
|string
|string
|None
|Trim leading whitespace from a string.

|`TrimRight`
|string
|string
|None
|Trim trailing whitespace from a string.

|`Uppercase`
|string
|string
|None
|Convert a string to uppercase.

|===
