Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on Checking word lengths on long strings in the Shared & Semi-Dedicated forum
what would be the easiest & most afficient way of checking the length of every word of user input, on for instance forums? I hate ...

  1. #1
    Smo
    Smo is offline
    JPC Addict
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    218

    Checking word lengths on long strings

    what would be the easiest & most afficient way of checking the length of every word of user input, on for instance forums? I hate how the layout gets messed up if someone posts long "words".


    Examle:heresanExampleofwhatImean!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    I want to make a script that checks the lengths of words and cuts then down if nessesary.

    [Edit]
    the example didnt work here :P
    [/Edit]

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    If you're using PHP, check out the wordwrap() function. I've used it extensively for formatting email messages sent out by scripts. It works well for formatting things.

    Keep in mind that web browsers automatically wrap text unless it is inside a tag such as <pre>. On forums non wrapping text is usually used when someone posts something like code, where you don't want it to automatically wrap.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Smo
    Smo is offline
    JPC Addict
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    218
    http://www.maqn.com/boredom/forumDis...p?fid=2&tid=36

    i coded my own forums - good practise - tho my friends tried to discorrage me

    ill look at the functon, thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •