apoc.number.parseInt

Details

Syntax

apoc.number.parseInt(text [, pattern, language ])

Description

Parses the given STRING using the given pattern and language to produce a INTEGER.

Arguments

Name

Type

Description

text

STRING

The string to parse an integer from.

pattern

STRING

The pattern the given string is in. The default is: ``.

language

STRING

An ISO-compliant language tag. The default is: ``.

Returns

INTEGER

Usage Examples

RETURN apoc.number.parseInt('12,345') AS output;
Results
output

12345

RETURN apoc.number.parseInt('12,345', '#,##0.00;(#,##0.00)') AS output;
Results
output

12345

RETURN apoc.number.parseInt('12.345', '' ,'it') AS output;
Results
output

12345