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

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

Expand Messages
  • Darren Osadchuk
    Mar 4, 2009
    • 0 Attachment
      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