Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Do JQuery have insert String by index method?
Old 12-19-2009, 11:18 AM Do JQuery have insert String by index method?
Novice Talker

Posts: 6
Trades: 0
Can below code be simplify?

Code:
	var index = 0;
	var temp = "12345";
	temp = temp.slice(0,index)+ "H" + temp.slice(index);
	console.log("Temp:" + temp);
I try searching and wonder whether JQuery got any method to insert string by index....

Example.
Code:
var temp = temp.append(0, "H");...
Thanks
fsloke is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-22-2009, 03:38 PM Re: Do JQuery have insert String by index method?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
jQuery's core functions have little to do with things to do like string manipulation, and are mostly only concerned with client-side functions like events, DOM manipulation, etc. There may be someone who has built some utility methods as an extension to jQuery, but that is not what jQuery is good for, so the useful in regards to jQuery of such a method is questionable.

Why don't you develop a few of your own utility functions for future use? The example you gave could be accomplished with the String.prototype. jQuery doesn't extend native objects for philosophical reasons, so if there is a method built in jQuery or a plugin, its syntax will be different, and will always be chained to the jQuery global object ($ or jQuery).
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Do JQuery have insert String by index method?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09887 seconds with 12 queries