omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Character count without spaces

    Editorial
    3
    4
    2647
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • openmedi
      openmedi last edited by

      I'm looking for a way to count characters in my documents that excludes spaces. I checked the workflow directory, but couldn't find anything. Thanks in adavance for any help with this!

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        def char_count(s):
            return len([c for c in s if not c.isspace()])
        
        1 Reply Last reply Reply Quote 2
        • omz
          omz last edited by

          This should work:

          http://www.editorial-workflows.com/workflow/5830267646246912/eTbaVMP7e2g

          1 Reply Last reply Reply Quote 2
          • openmedi
            openmedi last edited by

            Thanks for your help. I even did my own workflow (adaption): http://www.editorial-workflows.com/workflow/5859928086413312/X8gWpLDkBHs

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors