Software /
code /
prosody
Comparison
util/array.lua @ 5776:bd0ff8ae98a8
Remove all trailing whitespace
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Fri, 09 Aug 2013 17:48:21 +0200 |
parent | 5564:1292643ac498 |
child | 5857:8613888d0f9e |
comparison
equal
deleted
inserted
replaced
5775:a6c2b8933507 | 5776:bd0ff8ae98a8 |
---|---|
1 -- Prosody IM | 1 -- Prosody IM |
2 -- Copyright (C) 2008-2010 Matthew Wild | 2 -- Copyright (C) 2008-2010 Matthew Wild |
3 -- Copyright (C) 2008-2010 Waqas Hussain | 3 -- Copyright (C) 2008-2010 Waqas Hussain |
4 -- | 4 -- |
5 -- This project is MIT/X11 licensed. Please see the | 5 -- This project is MIT/X11 licensed. Please see the |
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | 8 |
9 local t_insert, t_sort, t_remove, t_concat | 9 local t_insert, t_sort, t_remove, t_concat |
57 if func(v) then | 57 if func(v) then |
58 outa[write] = v; | 58 outa[write] = v; |
59 write = write + 1; | 59 write = write + 1; |
60 end | 60 end |
61 end | 61 end |
62 | 62 |
63 if inplace and write <= start_length then | 63 if inplace and write <= start_length then |
64 for i=write,start_length do | 64 for i=write,start_length do |
65 outa[i] = nil; | 65 outa[i] = nil; |
66 end | 66 end |
67 end | 67 end |
68 | 68 |
69 return outa; | 69 return outa; |
70 end | 70 end |
71 | 71 |
72 function array_base.sort(outa, ina, ...) | 72 function array_base.sort(outa, ina, ...) |
73 if ina ~= outa then | 73 if ina ~= outa then |