Skip to content

conversion-library / otherToTen

Function: otherToTen()

ts
function otherToTen(str: string, base: number): number

otherBaseToDecimal

别名:otherToTen

Parameters

str: string

待转换的字符串

base: number

原字符串的进制

Returns

number

返回整数

Example

ts
decimalToOtherBase('1010', 2) // 10

Defined in

lib/decimal-conversion/decimalAndOtherBase.ts:65