1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-26 23:10:42 +02:00

сделал StringSplitBylength()

This commit is contained in:
Nikitin Aleksandr
2025-05-27 11:57:49 +03:00
parent ffb9130fcd
commit d2d4378cde
2 changed files with 28 additions and 0 deletions

View File

@@ -1535,3 +1535,11 @@ func TestRoundFloat64(t *testing.T) {
t.Errorf("Expected 1.1, but got %f", Otvet)
}
}
func TestStringSplitBylength(t *testing.T) {
Text1 := "Привет мир"
MassOtvet := StringSplitBylength(Text1, 5)
if MassOtvet[0] != "Приве" {
t.Errorf("Expected 'Приве', but got %s", MassOtvet[0])
}
}