Top

$chrpad()


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jul 02, 2009
Last Updated  Jul 02, 2009
Tags  char  character  chr  custom  identifier  knoeki  pad  padding  zomgwtfbbq  zowb 

Introduction

Similar to my last identifier, I now present you $chrpad().

Usage:

$chrpad(txt, len, chr, s)


txt is the text you want to apply padding to.
len is the MAXIMUM length of the full string, including padding.
chr is the chr code to use for padding.
s again does the same as in the last one, i.e. it adds the padding to the end rather than in front.

This can be useful for scripts if you want to nicely align nicknames or something like that.

Grab the Code

alias chrpad {
   if ($4 == s) {
      return $+($1,$str($chr($3), $calc($2 - $len($1))))
   }
   else {
      return $+($str($chr($3), $calc($2 - $len($1))),$1)
   }
}

Comments

  (0)  RSS

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom