mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 09:49:13 +02:00
87 string splitting by separator, not whitespace
This commit is contained in:
@@ -27,7 +27,9 @@ func GetRooms(app *pocketbase.PocketBase) []string {
|
||||
var roomArray []string
|
||||
|
||||
for _, event := range events {
|
||||
var room = strings.Split(event.Rooms, " ")
|
||||
var room = strings.FieldsFunc(event.Rooms, functions.IsSeparator(
|
||||
[]rune{',', ' ', '\t', '\n', '\r', '\u00A0'},
|
||||
))
|
||||
//split functions room by space and add each room to array if it is not already in there
|
||||
for _, r := range room {
|
||||
var text = strings.TrimSpace(r)
|
||||
|
Reference in New Issue
Block a user