Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Splitting characters

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
MrMayhem
Posts: 2
Joined: May 30th, 2006, 11:16 pm

Splitting characters

Post by MrMayhem »

Hi all!

Sorry if this has been covered somewhere, I've tried searching for a solution.

I'm using bignum to show a big clock (like many others I guess). The code is this:

Code: Select all

Screen 1:
$dll(bignum,2,1#2,$Time(hh)) * $dll(bignum,2,1#2,$Time(nn))
$dll(bignum,2,2#2,$Time(hh)) * $dll(bignum,2,2#2,$Time(nn))

Screen 2:
$dll(bignum,2,1#2,$Time(hh))   $dll(bignum,2,1#2,$Time(nn))
$dll(bignum,2,2#2,$Time(hh))   $dll(bignum,2,2#2,$Time(nn))
The reason for the split up of bignum is because I dont think the colon of bignum is big enough, so I make it with two ordinary asterisks (*). Also the two screens are shown 1 second each to make the "colon" blink nicely.

BUT, I still dont think its visible enough so I would like to separate the big numbers with a single space, like this:

Code: Select all

$dll(bignum,2,1#2,0 0) * $dll(bignum,2,1#2,0 0)
$dll(bignum,2,2#2,0 0) * $dll(bignum,2,2#2,0 0)
Obviously the above will only show 0 0 : 0 0. How can I extract the separate digits from the $Time(hh:nn)-method, so that "13:55" becomes "1 3 : 5 5"?

Thanks!

MrMayhem
Posts: 2
Joined: May 30th, 2006, 11:16 pm

Solved it myself...

Post by MrMayhem »

With a "chrsep.dll":

Code: Select all

$dll(chrsep.dll,1,$Time(hh:nn), ) generates:

1 6 : 5 2
param2 can be used for other characters to insert (only first one is considered).

Post Reply