Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Extract a Part of a Text

    2D Blocks
    1
    1
    201
    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.
    • info-creaticode
      CreatiCode last edited by admin

       

      Prerequisite

      • Operators for Letters in Text

       

      What is a Separator?

      A separator is a letter or text that can be used to split a text into one or more parts.

      For example, the text “abc|def” can be separated into two parts by the letter “|”: part 1 will be “abc” and part 2 will be “def”.

      The “Part ( ) of ( ) by ( )” Block

      This block is a reporter block in the operators category.


       

      When you run the “Part (part number) of (text) by (separator)” block, it will first separate the text into a few parts using the separator, then it will return one of the parts based on the part number. Any letter can be used as the separator.


       

      The Default Separator

      The “Part ( ) of ( ) by ( )” block uses the “White Space” letter as the default separator**. So if you don’t change the input box after “by”, the text will be split using the white space.


       

      1 Reply Last reply Reply Quote 0
      • First post
        Last post