-
Notifications
You must be signed in to change notification settings - Fork 16
New feature #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
New feature #22
Conversation
| TString s = stringInitWithCharArr("hello, world!"); | ||
| stringCapitalize(&s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавьте ещё больше разнообразных тестов
| s->data[i] = stringCharToLower(s->data[i]); | ||
| } | ||
|
|
||
| if (s->data[i] == ' ' || s->data[i] == '\t' || s->data[i] == '\n') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавьте в разделитель ещё ., ,, !, : и другие знаки препинания
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В остальном всё хорошо!
| s->data[i] = stringCharToUpper(s->data[i]); | ||
| capitalizeNext = false; | ||
| } else { | ||
| s->data[i] = stringCharToLower(s->data[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не нужно приводить букву к нижнему регистру. Функция только делает первую букву каждого слова большой (если это буква)
| test_stringPad(); | ||
| test_stringRemove(); | ||
| test_stringToInt(); | ||
| // test_stringToInt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему закомментирован старый тест?
| return number + decimal; | ||
| } | ||
|
|
||
| void stringCapitalize(TString *s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chat-GPT ❤️
Реализация функция stringCapitalize