This operation parses a string and returns an integer of the specified base (or radix).
In a positional numeral system, the base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal system, the radix is ten, because it uses the ten digits from 0 through 9.
In any standard positional numeral system, a number is conventionally written as (x)y with x as the string of digits and y as its base. However, for base ten the subscript is usually assumed (and omitted, together with the pair of parentheses), as it is the most common way to express value. For example, (100)10 is equivalent to 100 (the decimal system is implied in the latter) and represents the number one hundred, while (100)2 (in the binary system with base 2) represents the number four.
Commonly used numeral systems include:
2
- Binary numeral system
8
- Octal system
10
- Decimal system
12
- Duodecimal (dozenal) system
16
- Hexadecimal system
20
- Vigesimal system
36
- Base36
60
- Sexagesimal system
These are the input/output expected data types for this operation:
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Suppose you want to parse a series of strings and convert them to integers according to a specific base:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Parse int.
Set Base to 2
.
Give your Output field a name and click Save. The strings in your input field will be parsed according to the specified base. In this example:
You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.
- Strings you want to parse.
- Integers after applying the specified base.