• Home
  • About
  • Downloadables
  • Weightloss for Recessive Times

Kibo …

… keeping meat fresh since 1970

Feed on
Posts
Comments

LTrim() RTrim() Trim()

May 17th, 2005 by Intermanaut

To use these, just call LTrim(), RTrim(), or Trim() with the string you want trimmed.

<script type=”text/javascript”>

<!–

function LTrim(trimInputString)

{

while(trimInputString.charAt(0)==” “)

trimInputString=trimInputString.substring(1,trimInputString.length);

return (trimInputString);

}

function RTrim(trimInputString)

{

while(trimInputString.charAt(trimInputString.length-1)==” “)

trimInputString=trimInputString.substring(0,trimInputString.length-1);

return (trimInputString);

}

function Trim(trimInputString)

{

while(trimInputString.charAt(0)==” “)

trimInputString=trimInputString.substring(1,trimInputString.length);

while(trimInputString.charAt(trimInputString.length-1)==” “)

trimInputString=trimInputString.substring(0,trimInputString.length-1);

return (trimInputString);

}

//–>

</script>

Posted in JavaScript | No Comments

Comments are closed.

  • Recent Posts

    • Motorola MotoActv Review
    • Exceptionally Poor Grammar
    • The Adjustment Bureau
    • Unkown
    • Paul
  • Things

    • About
    • Addresses worth banning from your forum
    • Downloadables
    • Foamcore Macro Studio
    • Multiplicity: Pouring yourself a beer
    • Multiplicity: The five of me
    • Ross on Wye: What a Mess
    • Weightloss for Recessive Times
  • Stuff

    • Conversations (22)
    • Movies (21)
    • Programming (12)
      • ASP (3)
      • JavaScript (6)
      • PHP (2)
      • VBA (1)
    • Rambles (265)
      • Angry (48)
      • Happy (21)
    • Blogroll

      • 1 city, 2 people, 24 hours
      • del.icio.us
      • EmmieJay – guilt-free style
      • flickr

Kibo … © 2012 All Rights Reserved.

MistyLook made free by Web Hosting Bluebook