serena_knight Posted January 19, 2024 Posted January 19, 2024 i have the following data ptax pta2 23wv 23eq 23ep 23en if i sort it,,,it comes out 23en, 23ep, 23eq, 23wv, pta2, ptax i need it to be ptax, pra2, 23 en, 23ep, 23eq, 23wv i.e. numbers is comming first how do i do that?
Andreik Posted January 19, 2024 Posted January 19, 2024 #include <Array.au3> Local $aData[] = ['ptax','pta2','23wv','23eq','23ep','23en'] CustomSort($aData) _ArrayDisplay($aData) Func CustomSort(ByRef $aArray) _ArraySort($aData, True) For $Index = 0 To UBound($aData) - 1 If Int(StringLeft($aData[$Index], 1)) Then _ArraySort($aData, False, $Index) ExitLoop EndIf Next EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now