This should play if your Web browser has WebAssembly enabled (most do). Most examples will play unless they need to load files. The first time you click Play, Csound will spend a few seconds loading, then play. You can edit this code and replay it.
--nosound ; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 /* strstrip: strip whitespace from string Sout strstrip Sin [, Smode] Args Sin - string to strip whitespace from Smode - if not given, whitespace is stripped from left and right edges "l" - strip whitespace from left edge only "r" - strip whitespace from right edge only */ instr 1 Sout = strstrip(" \t\n foo bar \t\n") ; Sout = strstrip(" center ", "l") ; Sout = strstrip(" center ", "r") prints "string: '%s'\n", Sout turnoff endin i1 0 1