Skip to content

add string2uint64 and string2int64 #3

Description

@dportabella

example code:

uint64_t string2uint64(const char *str, uint8_t base) {
  uint64_t  result = 0;
  for (int i = 0; str[i] != '\0'; i++)
    result = result * base + str[i] - '0';
  return result;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions