Thursday, February 24, 2011

जावास्क्रिप्ट - String Object

string म्हणजे अक्षरसंच. उदा. "Welcome to Dnyandeep Foundation" किंवा "1234" याठिकाणी "1234" व 1234 यात फरक आहे हे लक्षात घेतले पाहिजे, "1234" हा अक्षरसंच आहे तर 1234 ही संख्या आहे.
String Object चे गुणविशेष व पद्धती यांची काही उदाहरणे खाली दिली आहेत.
string.toUppercase() कॅपिटल अक्षरे करणे
string.indexOf() विशिष्ट अक्षराचा क्रमांक दाखविणे. क्रमांक 0 पासून सुरू होतात.
string.lastIndexOf() विशिष्ट अक्षराचा शेवटचा क्रमांक दाखविणे.



String मधील शब्द शोधण्यासाठी वा बदलण्यासाठी खालीलप्रमाणे प्रोग्रॅम करता येतो.


String मधील शब्द वेगवेगळे करून array मध्ये दर्शविता येतात.खालील उदाहरण पहा
var str="Visit Dnyandeep Infotech";
var splitResult = str.split(" ");

for(i = 0; i < splitResult.length; i++){
document.write("
Element " + i + " = " + splitResult[i]);
}
याचे उत्तर
Element 0 = Visit
Element 1 = Dnyandeep
Element 2 = Infotech
असे येईल.

18 comments:

  1. It's an awesome post designed for all the internet viewers;
    they will get advantage from it I am sure.

    ReplyDelete
  2. Thanks for the auspicious writeup. It in reality used
    to be a entertainment account it. Look complex
    to far brought agreeable from you! However, how can we keep in touch?

    ReplyDelete
  3. bookmarked!!, I love your site!

    ReplyDelete
  4. Its such as you learn my thoughts! You appear to
    know so much approximately this, such as you wrote the ebook
    in it or something. I believe that you could do with some
    percent to pressure the message house a little bit, but other than that, that is wonderful blog.

    A great read. I'll definitely be back.

    ReplyDelete
  5. That is really fascinating, You are an excessively skilled blogger.

    I have joined your rss feed and look forward to in search of extra
    of your wonderful post. Additionally, I have shared your website in my social networks

    ReplyDelete
  6. My family members always say that I am wasting my time here at web, but I
    know I am getting know-how all the time by reading thes pleasant content.

    ReplyDelete
  7. I was suggested this web site by my cousin. I'm not sure whether this post is written by him
    as no one else know such detailed about my problem. You are wonderful!

    Thanks!

    ReplyDelete
  8. Good post. I learn something totally new and challenging on sites I
    stumbleupon everyday. It's always exciting to read content from other authors and use something from other web sites.

    ReplyDelete
  9. I love what you guys are usually up too. This type of clever work and coverage!

    Keep up the wonderful works guys I've incorporated you guys to blogroll.

    ReplyDelete
  10. Thank you a bunch for sharing this with all folks you really understand what you're speaking approximately!
    Bookmarked. Please also talk over with my web site =).

    We may have a link trade contract between us

    ReplyDelete
  11. Wow, awesome blog layout! How long have you been blogging for?
    you made blogging look easy. The overall look of your website is fantastic, as well as the
    content!

    ReplyDelete
  12. What's up all, here every one is sharing these kinds of knowledge,
    thus it's good to read this website, and I used to visit this blog everyday.

    ReplyDelete
  13. Its like you read my mind! You seem to know so much about this, like you
    wrote the book in it or something. I think that you could
    do with a few pics to drive the message home a bit, but instead of that, this is great
    blog. A great read. I'll definitely be back.

    ReplyDelete
  14. Hiya! I know this is kinda off topic nevertheless I'd figured I'd ask.
    Would you be interested in trading links or maybe guest writing a blog article or vice-versa?
    My site goes over a lot of the same subjects as yours and I feel
    we could greatly benefit from each other. If you are interested feel free to
    shoot me an e-mail. I look forward to hearing from you!
    Excellent blog by the way!

    ReplyDelete
  15. It is the best time to make some plans for the long run and it's time
    to be happy. I've read this submit and if I could I wish to suggest you few fascinating issues or advice.
    Perhaps you can write subsequent articles referring to this article.
    I want to learn more issues about it!

    ReplyDelete
  16. Everything is very open with a clear clarification of the challenges.
    It was truly informative. Your website is very useful.
    Many thanks for sharing!

    ReplyDelete
  17. Thanks a bunch for sharing this with all people you actually realize what you are talking
    approximately! Bookmarked. Kindly additionally consult with
    my web site =). We could have a hyperlink change agreement between us

    ReplyDelete
  18. When someone writes an paragraph he/she keeps the thought of a user in his/her brain that
    how a user can understand it. So that's why this
    post is amazing. Thanks!

    ReplyDelete