mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-30 08:19:36 +00:00
unique_count empty string bug fix
This commit is contained in:
parent
02ab8ea1d8
commit
6fa46ecb7c
1 changed files with 1 additions and 0 deletions
|
@ -798,6 +798,7 @@ function unique(arr) =
|
|||
// arr = The list to analyze.
|
||||
function unique_count(arr) =
|
||||
assert(is_list(arr) || is_string(arr))
|
||||
arr == [] ? [[],[]] :
|
||||
let( arr=sort(arr) )
|
||||
let(ind = [0,for(i=[1:1:len(arr)-1]) if (arr[i]!=arr[i-1]) i])
|
||||
[select(arr,ind),
|
||||
|
|
Loading…
Reference in a new issue