str2num

Arguments: $text (string)

Return: $number (int)

Converts textual string to integer. Works with negative numbers, d6, d12 and d20 rolls.