Use PHP functions in JavaScript

JavaScript wordwrap

Wraps buffer to selected number of characters using string break char

1
2
3
4
56
7
8
9
1011
12
13
14
1516
17
18
19
2021
22
23
24
2526
27
28
29
3031
32
33
34
3536
37
38
function wordwrap (str, int_width, str_break, cut) {
    // Wraps buffer to selected number of characters using string break char  
    // 
    // version: 1008.1718
    // discuss at: http://phpjs.org/functions/wordwrap    // +   original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
    // +   improved by: Nick Callen
    // +    revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Sakimori    // +   bugfixed by: Michael Grier
    // *     example 1: wordwrap('Kevin van Zonneveld', 6, '|', true);
    // *     returns 1: 'Kevin |van |Zonnev|eld'
    // *     example 2: wordwrap('The quick brown fox jumped over the lazy dog.', 20, '\n');
    // *     returns 2: 'The quick brown fox \njumped over the lazy\n dog.'    // *     example 3: wordwrap('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
    // *     returns 3: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod \ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \nveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea \ncommodo consequat.'
    // PHP Defaults
    var m = ((arguments.length >= 2) ? arguments[1] : 75   );
    var b = ((arguments.length >= 3) ? arguments[2] : "\n" );    var c = ((arguments.length >= 4) ? arguments[3] : false);
 
    var i, j, l, s, r;
 
    str += ''; 
    if (m < 1) {
        return str;
    }
     for (i = -1, l = (r = str.split(/\r\n|\n|\r/)).length; ++i < l; r[i] += s) {
        for (s = r[i], r[i] = ""; s.length > m; r[i] += s.slice(0, j) + ((s = s.slice(j)).length ? b : "")){
            j = c == 2 || (j = s.slice(0, m + 1).match(/\S*(\s)?$/))[1] ? m : j.input.length - j[0].length || c == 1 && m || j.input.length + (j = s.slice(m).match(/^\S*/)).input.length;
        }
    }    
    return r.join("\n");
}
external links: original PHP docs | raw js source

Examples

» Example 1

Running

1
wordwrap('Kevin van Zonneveld', 6, '|', true);

Should return

1
'Kevin |van |Zonnev|eld'

» Example 2

Running

1
wordwrap('The quick brown fox jumped over the lazy dog.', 20, '\n');

Should return

1
'The quick brown fox \njumped over the lazy\n dog.'

Dependencies

No dependencies, you can use this function standalone.

Open syntax issues

php.js uses JsLint to help us keep our code consistent and prevent some common bugs.

Eventually we want all code to pass or at least take into consideration most fixes suggested by JsLint, following this JsLint configuration we’ve decided on.


Authors

Thanks to the following developers, you get to have wordwrap goodness in JavaScript.

Comments

Add Comment
Use:
[CODE]
your_stuff('here');
[/CODE]
for proper code formatting
By submitting code here you are allowing us to use it in php.js hence dual licensing it under the MIT and GPL licenses

Gravatar
altaf
Feb 22nd Permalink

q  $(document).ready(function(){if($("input[name=modeofpayment]:radio")){$("input[name=modeofpayment]:radio").attr("checked","");}$("form").each(function(){var a=$(this);a.submit(function(){a.find("input[type='image'],input[type='submit']").attr("disabled","true");});});});function showHide(b,a){if(b!="MasterCardVisa"){$(".redborder").removeClass("redborder");}$("#cluetip").css("display","none");$("#mainerror").hide("fast");$(".displaydiv").not("#"+b).hide("fast");$("#"+b).show("slow");$(".greenshade").not("#"+a).removeClass("left big greenshade").addClass("left big yellowshade");$("#"+a).addClass("left big greenshade");}function print_page(a){win=window.open(a);}function populatecity(){var a=$("#citydis").val();if(a==""){alert("Please select your city");return false;}else{document.getElementById("city").value=a;document.getElementById("addresstable").style.display="block";document.getElementById("citydiv").style.display="none";}}$(document).ready(function(){$(".bluelink").cluetip({activation:"click",sticky:true,arrows:true,cluetipClass:"rounded",dropShadow:false,ajaxCache:true,closeText:"Close X",onShow:function(){var a=$("#cluetip").height();var b=$("#cluetip-arrows").position();if(b.top<20){$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows-white");}else{if(a>500&&b.top<400){$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows-white");}else{$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows");}}}});$(".bluelinkfront").cluetip({activation:"click",sticky:true,arrows:true,cluetipClass:"rounded",dropShadow:false,ajaxCache:true,width:316,positionBy:"bottomTop",closeText:"Close X",onShow:function(){$("#hint2").hide();$("#tooltip").hide();}});$(".bluelinklpop").cluetip({activation:"click",sticky:true,arrows:true,cluetipClass:"rounded",dropShadow:false,ajaxCache:true,width:387,closeText:"Close X",onShow:function(){$("#hint2").hide();$("#tooltip").hide();var a=$("#cluetip").height();var b=$("#cluetip-arrows").position();if(b.top<20){$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows-white");}else{if(a>400&&b.top<420){$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows-white");}else{if(a>200&&b.top<150){$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows-white");}else{$("#cluetip-arrows").removeClass();$("#cluetip-arrows").addClass("cluetip-arrows");}}}}});});function submitForm(b){var a="/payment/validate";$("#processing").empty().html('<img src="/images/wait.gif" /> &nbsp;&nbsp; Processing Request ....');$.getJSON(a,{cardhname:$("#cardhname").val(),ccno1:$("#ccno1").val(),ccno2:$("#ccno2").val(),ccno3:$("#ccno3").val(),ccno4:$("#ccno4").val(),month:$("#month").val(),year:$("#year").val(),cvv:$("#cvv").val(),ctype:$("input[name=cardtype]:checked").val()},function(d){$("#processing").hide();if(!d){b.submit();document.MasterCardVisa.reset();$("#cardhname").removeClass("redborder");$("#ccno1").removeClass("redborder");$("#ccno2").removeClass("redborder");$("#ccno3").removeClass("redborder");$("#ccno4").removeClass("redborder");$("#cvv").removeClass("redborder");$("label[for='cardtype-visa']").removeClass("redborder");$("label[for='cardtype-mastercard']").removeClass("redborder");$("#monthid").removeClass("redborder");$("#yearid").removeClass("redborder");}else{$("input[type='image']").removeAttr("disabled");var c="Please check the field marked in Red<br>";if(typeof(d.nameerror)!="undefined"){$("#cardhname").addClass("redborder");c+=d.nameerror+"<br>";}else{$("#cardhname").removeClass("redborder");}if(typeof(d.ccerror)!="undefined"){$("#ccno1").addClass("redborder");$("#ccno2").addClass("redborder");$("#ccno3").addClass("redborder");$("#ccno4").addClass("redborder");c+=d.ccerror+"<br>";}else{$("#ccno1").removeClass("redborder");$("#ccno2").removeClass("redborder");$("#ccno3").removeClass("redborder");$("#ccno4").removeClass("redborder");}if(typeof(d.cvverror)!="undefined"){$("#cvv").addClass("redborder");c+=d.cvverror+"<br>";}else{$("#cvv").removeClass("redborder");}if(typeof(d.ctypeerror)!="undefined"){$("label[for='cardtype-visa']").addClass("redborder");$("label[for='cardtype-mastercard']").addClass("redborder");c+=d.ctypeerror+"<br>";}else{$("label[for='cardtype-visa']").removeClass("redborder");$("label[for='cardtype-mastercard']").removeClass("redborder");}if(typeof(d.montherror)!="undefined"){$("#monthid").addClass("redborder");c+=d.montherror+"<br>";}else{$("#monthid").removeClass("redborder");}if(typeof(d.yearerror)!="undefined"){$("#yearid").addClass("redborder");c+=d.yearerror+"<br>";}else{$("#yearid").removeClass("redborder");}if(typeof(d.expiry)!="undefined"){$("#monthid").addClass("redborder");$("#yearid").addClass("redborder");c+=d.expiry+"<br>";}else{if(typeof(d.montherror)=="undefined"&&typeof(d.yearerror)=="undefined"){$("#monthid").removeClass("redborder");$("#yearid").removeClass("redborder");}}$("#mainerror").show();$("#error_div").html(c);self.location="#mainerror";}});return false;}function submitdebitForm(b){var a="/payment/validatedebitcard";$("#processing").empty().html('<img src="/images/wait.gif" /> &nbsp;&nbsp; Processing Request ....');$.getJSON(a,{debitcardhname:$("#debitcardhname").val(),dccno1:$("#dccno1").val(),dccno2:$("#dccno2").val(),dccno3:$("#dccno3").val(),dccno4:$("#dccno4").val(),dmonth:$("#dmonth").val(),dyear:$("#dyear").val(),dcvv:$("#dcvv").val(),dctype:$("input[name=dcardtype]:checked").val(),bankname:$("#bank_name").val()},function(d){$("#processing").hide();if(!d){b.submit();document.DebitCard.reset();$("#debitcardhname").removeClass("redborder");$("#dccno1").removeClass("redborder");$("#dccno2").removeClass("redborder");$("#dccno3").removeClass("redborder");$("#dccno4").removeClass("redborder");$("#dcvv").removeClass("redborder");$("label[for='dcardtype-visa']").removeClass("redborder");$("label[for='dcardtype-mastercard']").removeClass("redborder");$("#dmonthid").removeClass("redborder");$("#dyearid").removeClass("redborder");$("#bank_name").removeClass("redborder");}else{$("input[type='image']").removeAttr("disabled");var c="Please check the field marked in Red<br>";if(typeof(d.nameerror)!="undefined"){$("#debitcardhname").addClass("redborder");c+=d.nameerror+"<br>";}else{$("#debitcardhname").removeClass("redborder");}if(typeof(d.ccerror)!="undefined"){$("#dccno1").addClass("redborder");$("#dccno2").addClass("redborder");$("#dccno3").addClass("redborder");$("#dccno4").addClass("redborder");c+=d.ccerror+"<br>";}else{$("#dccno1").removeClass("redborder");$("#dccno2").removeClass("redborder");$("#dccno3").removeClass("redborder");$("#dccno4").removeClass("redborder");}if(typeof(d.cvverror)!="undefined"){$("#dcvv").addClass("redborder");c+=d.cvverror+"<br>";}else{$("#dcvv").removeClass("redborder");}if(typeof(d.ctypeerror)!="undefined"){$("label[for='dcardtype-visa']").addClass("redborder");$("label[for='dcardtype-mastercard']").addClass("redborder");c+=d.ctypeerror+"<br>";}else{$("label[for='dcardtype-visa']").removeClass("redborder");$("label[for='dcardtype-mastercard']").removeClass("redborder");}if(typeof(d.montherror)!="undefined"){$("#monthid").addClass("redborder");c+=d.montherror+"<br>";}else{$("#monthid").removeClass("redborder");}if(typeof(d.yearerror)!="undefined"){$("#yearid").addClass("redborder");c+=d.yearerror+"<br>";}else{$("#yearid").removeClass("redborder");}if(typeof(d.expiry)!="undefined"){$("#monthid").addClass("redborder");$("#yearid").addClass("redborder");c+=d.expiry+"<br>";}else{if(typeof(d.montherror)=="undefined"&&typeof(d.yearerror)=="undefined"){$("#monthid").removeClass("redborder");$("#yearid").removeClass("redborder");}}if(typeof(d.banknameerror)!="undefined"){$("#bankname").addClass("redborder");c+=d.banknameerror+"<br>";}else{$("#bankname").removeClass("redborder");}$("#mainerror").show();$("#error_div").html(c);self.location="#mainerror";}});return false;}function submitPickupform(b){var a="/payment/validatepickup";$("#processing").empty().html('<img src="/images/wait.gif" /> &nbsp;&nbsp; Processing Request ....');$.getJSON(a,{name:$("#name").val(),address1:$("#address1").val(),email:$("#email").val(),telephoneoffice:$("#telephoneoffice").val(),telephoneres:$("#telephoneres").val(),mobile:$("#mobile").val(),city:$("#city").val()},function(d){$("#processing").hide();if(!d){b.action="/payment/payment";b.submit();}else{$("input[type='image']").removeAttr("disabled");var c="<br>Please check the field marked in Red<br>";if(typeof(d.nameerror)!="undefined"){$("#name").addClass("redborder");c+=d.nameerror+"<br>";}else{$("#name").removeClass("redborder");}if(typeof(d.emailerror)!="undefined"){$("#email").addClass("redborder");c+=d.emailerror+"<br>";}else{$("#email").removeClass("redborder2");}if(typeof(d.address1error)!="undefined"){$("#address1").addClass("redborder");c+=d.address1error+"<br>";}else{$("#address1").removeClass("redborder");}if(typeof(d.cityerror)!="undefined"){$("#cityerr").addClass("redborder");c+=d.cityerror+"<br>";}else{$("#cityerr").removeClass("redborder");}if(typeof(d.phoneerror)!="undefined"){$("#telephoneoffice").addClass("redborder");c+=d.phoneerror+"<br>";}else{$("#telephoneoffice").removeClass("redborder");}$("#mainerror").show();$("#error_div").html(c);}});return false;}function submitPromocodeform(b){var a="/payment/validatepromocode";$("#processing").empty().html('<img src="/images/wait.gif" /> &nbsp;&nbsp; Processing Request ....');$.getJSON(a,{promocode:$("#promocode").val()},function(d){if(!d){b.action="/payment/activateprepaid";b.submit();}else{$("input[type='image']").removeAttr("disabled");var c="";if(typeof(d.promoemptyErr)!="undefined"){$("#promocode").addClass("redborder");c+=d.promoemptyErr+"<br>";}else{$("#promocode").removeClass("redborder");}$("#mainerror").show();$("#error_div").html(c);}});return false;}function submitajax(){var d=$("#popupcountry").val();if(typeof(d)!="undefined"){d=urlencode(d);}else{d="";}var c=$("#popcity").val();var b=$("#type").val();if(d!=""){var a="/payment/paymentoption/popup/"+b+"/ajax/true/popcity/"+c+"/popcountry/"+d;}else{var a="/payment/paymentoption/popup/"+b+"/ajax/true/popcity/"+c;}$(".addressoverflow").empty().html('<img src="/images/wait.gif" />');$(".addressoverflow").load(a);return false;}function urlencode(b){var a="";for(i=0;i<b.length;i++){if(b[i]==" "){a+="+";}else{a+=escape(b[i]);}}return a;}function fillCities(){var c=$("#popupcountry").val();c=urlencode(c);var b=$("#type").val();var a="/payment/paymentoption/popup/"+b+"/fillcity/true/popcountry/"+c;$("#citydiv").load(a);return false;}function setstylesheet(c,a){if(c=="styleblue"){var d=a+"css/stylesmall.css";var b=a+"css/stylebig.css";}else{if(c=="stylesmall"){var d=a+"css/stylesmall.css";var b=a+"css/styleblue.css";}else{var d=a+"css/stylebig.css";var b=a+"css/styleblue.css";}}$("link[@rel*=style][href]").each(function(){this.disabled=false;if(this.getAttribute("href")==d||this.getAttribute("href")==b){this.disabled=true;}});}

Gravatar
Kevin van Zonneveld
19 Apr '09 Permalink

q  @ Michael Grier: Great! That should obviously fix some windows issues.

@ Dave: Can you confirm that this solves your problem as well?

Gravatar
Michael Grier
14 Apr '09 Permalink

q  Without even testing in IE, I can say it should be using a regex in the split, especially when _reading_ from a textarea, because different OSes are going to be using different line break characters, and those characters are _read_ from a textarea. When you put text _into_ a textarea, the browser will insert the correct line break characters, but coming out of a textarea, the code has to deal with it.

So you should do this (windows|*nix|mac):

r = str.split(/\r\n|\n|\r/)

Gravatar
Kevin van Zonneveld
14 Apr '09 Permalink

q  @ Dave + Everyone: Is there anybody out there who has IE & can confirm / debug this? Otherwise I will have to see if I can run a virtualized machine or something but that seems like a lot of trouble for one buggy function.

Gravatar
Dave
9 Apr '09 Permalink

q  Slight problems using with a Textarea in IE6,7,8

In firefox the script works perfectly, just what I need. However in IE7 and IE8 if you happen to have a space at the end of the line, you get some very strange results (inserts and extra line, every character). Are you able to update your script so that if a space is at the end of the line, it deletes it(replaces with the \n). I expect it is easy to do, but I’m not a javascript expert (could do it in VBScript/ASP).

Great script though, works fine in all "proper" browsers, but unfortunately need it to work in IE as well. Thanks in advance,

Dave

Gravatar
Kevin van Zonneveld
1 Oct '08 Permalink

q  @ Sakimori: Excellent points Sakimori! I've fixed all of your suggestions (even blog regex ;) Thank you!

Gravatar
Sakimori
30 Sep '08 Permalink

q  Note that in PHP only the string parameter is required. The rest are optional.

The JS function header should just be:
[CODE=&quot;Javascript&quot;]function wordwrap(str)[/CODE]
... and the function body should begin with:
[CODE=&quot;Javascript&quot;] var int_width = ((arguments.length &gt;= 2) ? arguments[1] : 75 );
var str_break = ((arguments.length &gt;= 3) ? arguments[2] : &quot;\n&quot; );
var cut = ((arguments.length &gt;= 4) ? arguments[3] : false);[/CODE]
Note that 75, new-line, and false are PHP's default values for the width, break-string, and cut flag parameters. Feel free to rewrite my code; I write for legibility, not speed.

Also of note is that the comment submission form didn't want to take my preferred email address. Looks like it doesn't like dashes in the domain name. Might want to look over your email validation regexp.

Gravatar
Homer Villanueva - pinoy programmer
16 May '08 Permalink

q  It is a great help for us familiar with php but with only little knowledge in javascript. Thank you and more power!

Keep up the work and continue creating good things like this..


I really appreciate using the wordwrap function..

Gravatar
Kevin van Zonneveld
15 Apr '08 Permalink

q  @ Jonas Raoni: Working now, thank you!

Gravatar
Jonas Raoni
15 Apr '08 Permalink

q  Awful haha, it was a mistake in the help code, I don't check the English version of the site since I'm brazilian, I've added the missing &lt;/dd&gt; ^^

Gravatar
Kevin van Zonneveld
13 Apr '08 Permalink

q  @ Jonas Raoni: Your link gives an error in FF3 on Ubuntu:

[CODE=&quot;text&quot;]
XML Parsing Error: mismatched tag. Expected: &lt;/dd&gt;.
Location: http://jsfromhell.com/string/wordwrap
Line Number 135, Column 4: &lt;/dl&gt;
----------^
[/CODE]

Gravatar
Jonas Raoni
12 Apr '08 Permalink

q  Be aware that the modification by Nick Callen over my original wordwrap code breaks this snippet:

alert(wordwrap(&quot;qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&quot;, 10, &quot;\n&quot;));

The last version is sitted here: http://jsfromhell.com/string/wordwrap

Gravatar
Kevin van Zonneveld
22 Jan '08 Permalink

q  @ Andrea Giammarchi: Thanks for helping out. I wasn't mentally ready to make exceptions in my generic tester, but hey, sometimes you gotta be flexible.

I also had to change the system to accept:
[CODE=&quot;Javascript&quot;]
define = (function(){
[/CODE]

instead of
[CODE=&quot;Javascript&quot;]
function define(){
[/CODE]

But you'll be happy to know that it works now:
http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_define/

So thanks!

Gravatar
Andrea Giammarchi
21 Jan '08 Permalink

q  Kevin you could know PHP perfectly but you should study a bit more JavaScript :D

[CODE=&quot;Javascript&quot;]
if(!function_exists2('define')){
document.write('&lt;div class=&quot;bad&quot;&gt;&lt;xmp&gt;n/a&lt;/xmp&gt;&lt;/div&gt;');
outcom = ['0', 'function does not exist'];
} else {
result = (function(){
var result = false;
define('AUTHOR_NAME', 'Andrea Giammarchi');
try{result = !!AUTHOR_NAME}catch(e){};
return result;
})();
should = true;
outcom = comparer(result, should);
class = ( outcom[0] &gt; 0 ? 'good' : 'bad' );
document.write('&lt;div class=&quot;'+class+'&quot;&gt;&lt;xmp&gt;'+print_r2(result)+'&lt;/xmp&gt;&lt;/div&gt;');
}
[/CODE]

cya ;)

Gravatar
Kevin van Zonneveld
20 Jan '08 Permalink

q  @ Andrea Giammarchi: Don't worry I think it's cool and I really want to add it. And by the way, once it's added, credits are updated automatically.

But my problem now is that I couldn't get define() compatible with my automatic tester:
http://kevin.vanzonneveld.net/pj_tester.php?unstable=true&amp;jsfile=_define.js

So that's the reason that I had to put it 'under construction'. I have to figure out how to solve this.

Gravatar
Andrea Giammarchi
20 Jan '08 Permalink

q  I wonder why you didn't post my comment but you added &quot;define&quot; under construction. Come on guys, define exists and it's perfectly compatible with php one since 3 or more months ago.

Please add my name in contributes and good luck with this project.

Cheers

Gravatar
Kevin van Zonneveld
10 Jan '08 Permalink

q  @ Jonas Raoni: I'm going to process all of your links (utf8 is already present though). And judging by the quality of previous functions from your hand, I think it's safe to say they'll all end up here. Thanks a bunch :)

Gravatar
Jonas Raoni
10 Jan '08 Permalink

q  array_diff
http://jsfromhell.com/array/diff

date
http://jsfromhell.com/geral/date-format

levenshtein
http://jsfromhell.com/string/levenshtein

bindec/decbin/dechex/etc
http://jsfromhell.com/number/base-conversor

number_format
http://jsfromhell.com/number/fmt-money

setcookie
http://jsfromhell.com/geral/cookie

utf8
http://jsfromhell.com/geral/utf-8

checkdate:
http://jsfromhell.com/geral/is-date

shuffle
http://jsfromhell.com/array/shuffle

pack/unpack
http://jsfromhell.com/classes/binary-parser

array_chunk
http://jsfromhell.com/array/chunk

array_unique
http://jsfromhell.com/array/remove-duplicated

Gravatar
AljazB
8 Jan '08 Permalink

q  Awesome, stari!!!

Gravatar
Kevin van Zonneveld
8 Jan '08 Permalink

q  @ mdsjack: Hi Jack, I have added include() and improved trim() to support 'nbsp'. strip_tags() was already here.
Thank you very much for contributing! Kevin

Gravatar
mdsjack
8 Jan '08 Permalink

q  Here's some code I had done for my needs:

[CODE=&quot;Javascript&quot;]
function include(filename) // PHP include() emulation
{ // BY mdsjack (http://www.mdsjack.bo.it)
var js = document.createElement('script');
js.setAttribute('type', 'text/javascript');
js.setAttribute('src', filename);
js.setAttribute('defer', 'defer');
document.getElementsByTagName('HEAD')[0].appendChild(js);
};

String.prototype.trim = function() // PHP trim() emulation
{ // BY mdsjack (http://www.mdsjack.bo.it)
return this.replace(/&amp;nbsp;$/g, ' ').replace(/^\s*|\s*$/g, '');
};

String.prototype.strip_tags = function() // PHP strip_tags() emulation
{ // BY mdsjack (http://www.mdsjack.bo.it)
return this.replace(/(&lt;([^&gt;]+)&gt;)/ig, '');
};

[/CODE]

cheers,
jack.

Gravatar
BlazS
7 Jan '08 Permalink

q  Awesome! ;)


Contribute a New function