Logo

Programming-Idioms

Extract the integer value i from its string representation s, in radix b
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
#include <stdlib.h>
int i = strtol(s, NULL, b);
import "strconv"
i, err := strconv.ParseInt(s, b, 0)
Integer i = Integer.valueOf(s, b);
i := StrToInt64Base(s, b);
i = int(s, b)
i = s.to_i(b)