tglogo.png

Downloading File

Filename: $iscaps
;--- Usage ----------------
;--- $iscaps(string).up  <-- %caps
;--- $iscaps(string).low <-- %lowercase
;--- $iscaps(string)  <-- %caps , %lowercase
;--------------------------
alias iscaps { 
  if ($isid) {
    if ($prop = up) { 
      var %i $regex($1-,/[A-Z]/g), %r $regex($1-,/[A-Z]/gi)
      return $round($calc(%i / %r * 100),2) $+ %
    }
    if ($prop = low) { 
      var %m $regex($1-,/[a-z]/g), %r $regex($1-,/[A-Z]/gi)
      return $round($calc(%m / %r * 100),2) $+ %
    }
    if (!$prop) {
      ;Capital , Lowercase
      var %i $regex($1-,/[A-Z]/g), %m $regex($1-,/[a-z]/g), %r $regex($1-,/[A-Z]/gi)
      return $round($calc(%i / %r * 100),2) $+ % , $round($calc(%m / %r * 100),2) $+ %
    }
  }
}

Related Files

by pony
by Purcell

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand