MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / SetBase10

Method SetBase10

Int.cpp:970–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968// ------------------------------------------------
969
970void Int::SetBase10(char *value) {
971
972 CLEAR();
973 Int pw((uint64_t)1);
974 Int c;
975 int lgth = (int)strlen(value);
976 for(int i=lgth-1;i>=0;i--) {
977 uint32_t id = (uint32_t)(value[i]-'0');
978 c.Set(&pw);
979 c.Mult(id);
980 Add(&c);
981 pw.Mult(10);
982 }
983
984}
985
986// ------------------------------------------------
987

Callers 1

CheckMethod · 0.80

Calls 2

MultMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected