DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


sample_code:listroots

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sample_code:listroots [2018/03/14 00:00]
67.58.20.65 created
sample_code:listroots [2018/03/14 00:18] (current)
67.58.20.111 try3
Line 7: Line 7:
     // is received.     // is received.
     //////////////////////////////////////////////////////////​     //////////////////////////////////////////////////////////​
 +
 +    function parseKb(item) {
 +        //​alert('​item='​+item);​
 +        var mult=1;
 +        if(item.indexOf('​G'​) > -1) { mult=1024*1024;​ }
 +        if(item.indexOf('​M'​) > -1) { mult=1024; }
 +        if(item.indexOf('​K'​) > -1) { mult=1; }
 +        return parseFloat(item)*mult;​
 +    }
 +     
 +    //////////////////////////////////////////////////////////​
 +
 </​code>​ </​code>​
sample_code/listroots.txt ยท Last modified: 2018/03/14 00:18 by 67.58.20.111