Professional Web Applications Themes

Number of Character of a string - Macromedia ColdFusion

how do you evaluate the number of characters that made a string? I have to display the string present into a database field. The string is the result of a cftextarea insertion. Unfortunately the wrapping of the text is lost, so the original format of 25 chars by 5 lines became a long line of text. I wish to evaluate the numeber of characters of the string so i can set a loop a put a line break every 25 characters. Any idea how? Thank you, dario...

  1. #1

    Default Number of Character of a string

    how do you evaluate the number of characters that made a string? I have to
    display the string present into a database field. The string is the result of a
    cftextarea insertion. Unfortunately the wrapping of the text is lost, so the
    original format of 25 chars by 5 lines became a long line of text. I wish to
    evaluate the numeber of characters of the string so i can set a loop a put a
    line break every 25 characters. Any idea how? Thank you, dario

    xcoldnet Guest

  2. #2

    Default Re: Number of Character of a string

    The len("string") function returns the length of a string (or binary object)
    paross1 Guest

  3. #3

    Default Re: Number of Character of a string

    Thank you, meanwhile I studied the CFML reference and I found a nice function
    called.... Wrap(string,limit) It insert a line break into the string at
    'limit' interval being limit an integer. Unfortunately now my line of text is
    displayed with white spaces every 25 charcters (I have set limit as 25) BUT
    there is not carriage return, I wonder if there is something else to set. Any
    idea? Dario

    xcoldnet Guest

Similar Threads

  1. Count Character In String?
    By twodaend in forum Coldfusion - Advanced Techniques
    Replies: 3
    Last Post: July 26th, 05:59 PM
  2. First Character in a string
    By brutas in forum Macromedia ColdFusion
    Replies: 1
    Last Post: March 2nd, 07:11 PM
  3. Inserting character by UNICODE number
    By redlik@adobeforums.com in forum Adobe Indesign Windows
    Replies: 15
    Last Post: August 29th, 02:41 PM
  4. textField width - Font size - number of character
    By flashkid in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: March 1st, 07:24 AM
  5. Replies: 4
    Last Post: September 12th, 04:19 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139