MCPcopy Create free account
hub / github.com/ActiveState/code / convert_string

Function convert_string

recipes/JavaScript/578517_Music_player/recipe-578517.js:609–628  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

607
608// takes the filename off the last part of the directory.
609function convert_string(s)
610{
611 var r="";
612 var c="";
613 var lc="";
614 s=s.toUpperCase();
615 var i=0;
616 var sp=s.lastIndexOf("\\");
617 if (sp<=0) sp=0;
618 for (i=sp;i<s.length;i++)
619 {
620 c=s.charAt(i);
621 if (c!="\'") // skip apost in can't, etc, so it is treated as one word.
622 {
623 if (!is_upper_alpha_num(c)) c=" ";
624 if (c!=" " || lc!=" ") r+=c;
625 }
626 }
627 return r;
628}
629
630function convert_input_string(s)
631{

Callers 2

init_capsFunction · 0.85
change_soundFunction · 0.85

Calls 1

is_upper_alpha_numFunction · 0.85

Tested by

no test coverage detected