Go-based FM stereo transmitter with RDS, Windows-first and cross-platform
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

22 satır
339B

  1. package rds
  2. import "strings"
  3. func normalizePS(ps string) string {
  4. ps = strings.ToUpper(ps)
  5. if len(ps) > 8 {
  6. ps = ps[:8]
  7. }
  8. if len(ps) < 8 {
  9. ps = ps + strings.Repeat(" ", 8-len(ps))
  10. }
  11. return ps
  12. }
  13. func normalizeRT(rt string) string {
  14. if len(rt) > 64 {
  15. rt = rt[:64]
  16. }
  17. return rt
  18. }