wrapping type function...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beramode
    Senior Member
    • Apr 2002
    • 106

    wrapping type function...

    Is there a function that wraps strings after a certain amount of text, but instead of breaking onto a new line simply stops printing the rest of the string in place of ...

    eg: The cat jumped onto the mat

    I need a function that would wrap it to something like

    The cat jumped on...

    eg: wraps to nothing after 17 characters in the example.
  • MUG
    Senior Member
    • Apr 2002
    • 1191
    • 2.3.0

    #2
    substr("The cat jumped onto the mat", 0, 17);

    Comment

    • Beramode
      Senior Member
      • Apr 2002
      • 106

      #3
      Thanks!

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...