Loading ...
Sorry, an error occurred while loading the content.

8231Re: [FlashLite] fscommand2("GetPlatform")

Expand Messages
  • Weyert de Boer
    Mar 4, 2009
    • 0 Attachment
      Depends if the null character is getting translated to a space also in
      these methods. If not, it would work if you use String.fromCharCode(0)
      probably.

      > Probably other ways to do it, but:
      >
      > var str = "Nokia OS ";
      > while (str.charAt(str.length-1) == " ") {
      > str = str.substr(0, str.length-1);
      > }
      >
      > would work.
      >
      > D.
      >
      > Barry Beattie wrote:
      > >
      > >
      > > > var str = "cow ";
      > > > str = str.split(" ").join("");
      > >
      > > hang on, that won't work:
      > >
      > > "Nokia OS " would be
      > >
      > > "NokiaOS"
      > >
      > > you're splitting the string into an array based on a space as the
      > delimiter
      > >
      > > and then joining the array to a string. Any delimiter occurance would
      > > be a new array element to then join (now without the space)
      > >
      > >
      >
      >
    • Show all 13 messages in this topic