Top

Binary variable identifiers

Please Register to submit score.
Average Score  10.0
Scores Submitted  2
Date Added  Mar 26, 2008
Last Updated  Mar 26, 2008
Tags  binary  binvar 

Introduction

/*
***************************************************************************************************
*
* binvar identifiers by jaytea
*
* re-creates mirc's own text identifiers but lets you pass the name of a binvar to use
* in the main string parameter. all identifiers that normally return strings will instead
* return the name of the binary variable containing the result ($1). this means if you want
* to preserve the original binvar you'll need to /bcopy first.
*
* this behavior allows you to nest binvar identifiers very easily, for example:
*
* //bset -t &x 1 haaahah lolol | echo -a $bvar($bremove($bmid(&x,2,-3),a),1-).text
*
* each alias works as a standalone piece of code, ie. they're all independent of each
* other. so you can pick and choose which you want if you don't wish to copyt them all
* syntax is equivalent to the assosciated mirc identifier, except you prepend a 'b' to the
* name of the identifier and pass the name of a binvar as the first parameter
*
* token identifiers not yet implemented, i'll do those if there's a desire for them, though
* there's a single prop:
*
* $bident().text
*
* for all appropriate identifiers. why would you need it? well, as it stands, every parameter
* (except $1) that's normally a string is checked for a sequence of bytes, for example:
*
* $bcount(&b,abc,32) counts the number of "abc"s as well as the spaces $chr(32)
*
* $bremove(&b,97 98 99) removes all occurences of "abc"
*
* this mimics $bfind()'s behavior. you can stop this from happening with the .text prop
*
* like i said i've tried to replicate mirc's own behavior in almost every way with regard to
* subtleties such as preserving spaces, and reproducing less known but equally useful behavior
*
***************************************************************************************************
*/

Grab the Code

Comments

  (1)  RSS
Lindrian
Comments: 714
 
Posted on Mar 26, 2008 4:51 pm
Looks useful! great job :)

Please Register or Login to start posting comments.
Bottom