Skip to content

Conversation

@wistfullly
Copy link

Предлагаю добавить данную реализацию в cstring.h

return number + decimal;
}

int64_t stringToInt(TString s) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно добавить заголовок функции в начале файла

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И написать тесты в файл со всем тестами функций

}

while (i < s.size && s.data[i] >= '0' && s.data[i] <= '9') {
result = result * 10 + (s.data[i] - '0');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно обработать переполнение int64_t

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants