ListUtilz Extension
An extension for MIT App Inventor 2.Powerful list utilities extension to work with lists with multiple functions. Developed by The K Studio.
Download: v5 com.thekstudio.listutilz.aix (15.2 KB)
Specifications
Package: com.thekstudio.listutilz
Size: 15.24 KB
Minimum API Level: 7
Updated On: 2025-06-16T18:30:00Z
Built & documented using: v3.1.0
Events:
ListUtilz has total 2 events.
ListFiltered
Event triggered when a list is filtered. Returns the filtered list and the indices of filtered items.
Parameter | Type |
---|---|
filteredList | list |
filteredIndices | list |
SortedListAtoZ
Event triggered when a list is sorted alphabetically.
Parameter | Type |
---|---|
sortedList | list |
sortedIndices | list |
Methods:
ListUtilz has total 30 methods.
ReverseList
Reverses a given list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
GetList1toN
Get integer list from 1 to N in increasing order.
- Return type:
list
Parameter | Type |
---|---|
n | number |
GetRandomList1toN
Get integer list from 1 to N in random order.
- Return type:
list
Parameter | Type |
---|---|
n | number |
GetDuplicateItems
Finds duplicates in a given list and returns a new list containing only the duplicate items.
- Return type:
list
Parameter | Type |
---|---|
list | list |
GetMaximumNumber
Get maximum number from the given integer list.
- Return type:
number
Parameter | Type |
---|---|
list | list |
GetMinimumNumber
Get minimum number from the given integer list.
- Return type:
number
Parameter | Type |
---|---|
list | list |
GetLastItem
Get last item from the given list.
- Return type:
any
Parameter | Type |
---|---|
list | list |
CompareLists
Compares two given lists and returns true if they match, false otherwise.
- Return type:
boolean
Parameter | Type |
---|---|
list1 | list |
list2 | list |
ListToJSON
Converts a given list to a JSON string.
- Return type:
text
Parameter | Type |
---|---|
list | list |
GetDistinctList
Returns a new list containing the distinct (unique) elements from the given list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
ShuffleList
Returns a new list with the elements randomly shuffled.
- Return type:
list
Parameter | Type |
---|---|
list | list |
GetListUnion
Returns a new list containing the union of multiple lists (combines the elements from all input lists, removing any duplicates).
- Return type:
list
Parameter | Type |
---|---|
lists | list |
GetListOccurrences
Returns the number of occurrences (duplicates) of an item in given list.
- Return type:
number
Parameter | Type |
---|---|
list | list |
item | any |
GetListOccurrencesIndex
Returns a list of indices at which the given item occurs in the list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
item | any |
GetListSlice
Returns a slice of the given list from the start index (inclusive) to the end index (exclusive).
- Return type:
list
Parameter | Type |
---|---|
list | list |
startIndex | number |
endIndex | number |
SortIntegers
Sorts a given list of integers with negative values first in ascending order.
- Return type:
list
Parameter | Type |
---|---|
list | list |
RemoveItems
Removes items from the given list within the specified range and returns the modified list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
startIndex | number |
endIndex | number |
SortListAtoZ
Sorts a given list alphabetically.
- Return type:
list
Parameter | Type |
---|---|
list | list |
ignoreCase | boolean |
GetListIntersection
Returns a new list containing the intersection of multiple lists.
- Return type:
list
Parameter | Type |
---|---|
lists | list |
GetFilteredList
Filters a given list based on a keyword with case sensitivity control.
- Return type:
list
Parameter | Type |
---|---|
list | list |
keyword | text |
caseSensitive | boolean |
FilterList
Filters a given list based on a keyword with case sensitivity control and return filtered list in ListFiltered event.
Parameter | Type |
---|---|
list | list |
keyword | text |
caseSensitive | boolean |
FilterListAsync
Filters a given list based on a keyword with case sensitivity control and return filtered list in ListFiltered event.
Parameter | Type |
---|---|
list | list |
keyword | text |
caseSensitive | boolean |
SortStringIntegers
Sorts integers within given list of strings with negative values first in ascending order.
- Return type:
list
Parameter | Type |
---|---|
list | list |
GetFilteredListWithKeywords
Filters a given list based on a list of keywords with case sensitivity control.
- Return type:
list
Parameter | Type |
---|---|
list | list |
keywords | list |
caseSensitive | boolean |
GetFirstNItems
Get the first n items from the given list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
n | number |
GetLastNItems
Get the last n items from the given list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
n | number |
SortListAtoZAsync
Sorts a given list alphabetically.
Parameter | Type |
---|---|
list | list |
ignoreCase | boolean |
SortByCategory
Sorts elements from list1 based on the category specified by keyword from list2.
- Return type:
list
Parameter | Type |
---|---|
list1 | list |
list2 | list |
keyword | text |
GetListPermutations
Get all permutations of the given list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
GetListCombinations
Get all combinations of the given size from the list.
- Return type:
list
Parameter | Type |
---|---|
list | list |
combinationSize | number |
Instructions to use extension
Use this block to sort a given list alphabetically. It also considers integers and sort in natural sorting order.
Use this block to sort given list of integers in increasing order. No matter the list item is a single digit or multiple digit. It also supports negative values.
Reverses the given list.
Search in a given list with a specific keyword and get all items containing the given keyword. Useful for filtering list or making search system.
Shuffles the given list.
Returns duplicate items as a list.
GetOccurrences block will return the count of item in a list (how many times it is in the list) and index block will return the indices of these items.
Get integer list from 1 to given n
Get minimum and maximum number from a given integer list.
Get last list item
Converts a given list into JSON string.
Compare given two lists and returns true if matches else false.
Returns a new list containing the union of two lists (combines the elements from both input lists, removing any duplicates).
Returns a new list containing the distinct (unique) elements from the given list.
Returns a new list containing the intersection of given lists (a new list containing the common elements present in all input lists). Accepts multiple lists.
Returns a slice (part) of the given list from the start index (inclusive) to the end index (exclusive).
RemoveItems from start index to end index and return filtered list.
CHANGE LOG
Added a new block FilterListAsync to filter list asynchronously and return filtered list as well as their indices.
Added function to Sort list A to Z async and returns sorted list along with sorted indices.