Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
That just creates a string that repeats
string
n
times. Nothing more to it.A more Swift name would be:
or you could use a method on String
These functions are against Swift naming conventions.
func repeatStr(_ string: String, _ n: Int) -> String
. Global functions, the termStr
, blank external labels andn
as an internal label are all against Swift naming guidelines.