Announcement

Collapse
No announcement yet.

Count Paragraph Character?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Count Paragraph Character?

    Hello is anyone can help me how to count the Character in a Paragraph including the space? and return the value?
    Thank you

  • #2
    it's in the manual - (Paragraph object is named Readme)

    Code:
    readme_text = Paragraph.GetText("Readme");
    
    size = String.Length(readme_text);

    Comment


    • #3
      You can also employ the unary # symbol for this, telco. It's the standard length operator used in native Lua,. And will return the number of bytes in a given string. Is a slightly cleaner, more efficient way to do it:
      Code:
      local n = #(Paragraph.GetText("Paragraph1"));
      Dialog.Message("", n);

      Comment


      • #4
        BioHazard and charliechaps Thank you for sharing help...

        Comment

        Working...
        X