I'm trying to split a string using split() method but it work case-sensitifly, the question is as typed on the title.
The problem is like this
var str, ret;
str = "NubNubLabaLabaNubNub";
ret = str.split("labalaba"); // ret return ["NubNubLabaLabaNubNub"]
// which i wanted ["NubNub","NubNub"]
When i using toLowerCase() or toUpperCase() the whole string will change, and after spliting i want it to be an original one.
str = "NubNubLabaLabaNubNub";
ret = str.toLowerCase().split("labalaba".toLowerCase());
ret return ["nubnub","nubnub"] but the result that i wanted is ["NubNub","NubNub"]
I still not understand how to return the "nubnub" to "NubNub"
Thanks.