Jump to content
Sign in to follow this  
Rota

How to find the Min String by ASC

Recommended Posts

Rota

Hi dears,

Please do me a favor to find out the minimal string by ASC...

For example, I have these 4 strings, ABCD12345,ABDE12356,ABCD15489,DWED12345, I store them into a array $Astring, then what I do now is to go through all digits in each string do a comparison ordinally to find out the minimal one.

1st Round: A A A D (by ASC code, we could exclude the string start with D)

2nd Round: B B B (no difference)

3rd Round: C D C (Exclude string 2)

...

Then we find string 1 (ABCD12345) is the minimal one.

How can we put it into coding in AU3?

Thanks

Share this post


Link to post
Share on other sites
WideBoyDixon

Two ways:

#include <Array.au3>
_ArraySort($Astring)
MsgBox(64, "Lowest", $Astring[0])oÝ÷ Øz0z÷«ü¨¹Ú'ßÛpj{m¢Ê+¶Ø^jºÚÊØ^«­¢+ØÀÌØíÍ1½ÝÍÐôÀÌØíÍÑÉ¥¹lÁt)½ÈÀÌØí¤ôÄQ¼U    ½Õ¹ ÀÌØíÍÑÉ¥¹¤´Ä(%ÀÌØíÍÑÉ¥¹lÀÌØí¥t±ÐìÀÌØíÍ1½ÝÍÐQ¡¸ÀÌØíÍ1½ÝÍÐôÀÌØíÍÑÉ¥¹lÀÌØí¥t)9áÐ)5Í  ½à ØаÅÕ½Ðí1½ÝÍÐÅÕ½Ðì°ÀÌØíÍ1½ÝÍÐ

WBD

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.