Strings and numbers question.
LAHAYE Olivier
olivier.lahaye at cea.fr
Tue May 16 14:11:51 UTC 2017
Can I extract numbers from strings? I mean does the following code work?
msg="P=034";
val=0 + msg.SubString(2,3);
if (val > 10) {
// It works
} else {
// How can I achieve that?
}
(I'm using status to get multiple values for a progress bar in the following format)
<4 letters for the progress type>:<3digits current value>:<3digits max value>
- The 4 letters are for the bar type
- The current value is the completion (either percentage or script number being run)
- The max value is 100 for percentage or the number of scripts to be processed.
If I display the value, it s "#NULL" ....
Thanks for any tips on how to get the value as a number in order to help me to draw the progressbar gauge.
--
Olivier LAHAYE
CEA DRT/LIST/DIR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/plymouth/attachments/20170516/45260b36/attachment.html>
More information about the plymouth
mailing list