1
0

Minor fixes

This commit is contained in:
magnolia-fan
2011-09-15 23:32:23 +04:00
parent 16fffcd9d0
commit 1e7ebeb23f
2 changed files with 10 additions and 8 deletions
+7 -7
View File
@@ -61,10 +61,10 @@ class VkontakteMusic
artist+" "+track.replace(/\(.*\)/i, '').split('/')[0]
trim: (str) ->
while str.indexOf(' ') isnt -1
str = str.replace ' ', ' '
if str.charAt(0) is ' '
str = str.substring 1
if str.charAt(str.length - 1) is ' '
str = str.substring 0, str.length - 1
str
while str.indexOf(' ') isnt -1
str = str.replace ' ', ' '
if str.charAt(0) is ' '
str = str.substring 1
if str.charAt(str.length - 1) is ' '
str = str.substring 0, str.length - 1
str