Updated comment explaining function
This commit is contained in:
@@ -13,7 +13,7 @@ unsigned int to_decimal(std::string num, int from_base) {
|
||||
|
||||
/* Here, we convert 'num' to decimal (base 10) - Find the index of
|
||||
every character in the string, in 'possible_chars' and
|
||||
compute the value using */
|
||||
compute the value using the position of the character in the number. */
|
||||
for (int i=0; i < (int)num.length(); i++) {
|
||||
current_char = num.at(i);
|
||||
index = possible_chars.find(toupper(current_char)); // Convert the character to upper-case, so that the earliest match is detected
|
||||
|
Reference in New Issue
Block a user