Skip to content
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

Hw02 unpack string #2

Merged
merged 6 commits into from
Apr 14, 2024
Merged

Hw02 unpack string #2

merged 6 commits into from
Apr 14, 2024

Conversation

DimVlas
Copy link
Owner

@DimVlas DimVlas commented Apr 13, 2024

Домашнее задание №2 «Распаковка строки»

Чек-лист студента (Что это?)

Критерии оценки

  • Пайплайн зелёный - 4 балла
  • Добавлены новые юнит-тесты - до 4 баллов
  • Понятность и чистота кода - до 2 баллов

Зачёт от 7 баллов

Copy link
Collaborator

@agneum agneum left a comment

Choose a reason for hiding this comment

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

Спасибо за выполненное задание. Хорошая работа
Итого: 10 баллов из 10. Принято

Comment on lines +21 to +28
func IsDigit(r rune) bool {
for _, num := range nums {
if num == r {
return true
}
}
return false
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Думаю, что можно использовать функцию стандартной библиотеки https://pkg.go.dev/unicode#IsDigit

Comment on lines +43 to +44
lenRunes := len(runes)
for i := 0; i < lenRunes; i++ {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Удобнее и проще будет использовать цикл range. Это позволит на каждой итерации получать текущий символ, при необходимости запоминать предыдущий и не обращаться к элементам по индексу

@DimVlas DimVlas merged commit 9686aee into master Apr 14, 2024
3 checks passed
@DimVlas DimVlas deleted the hw02_unpack_string branch May 4, 2024 21:42
DimVlas added a commit that referenced this pull request Jan 6, 2025
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