Substring Command

Batuhancoskun
Batuhancoskun New Altair Community Member
edited October 2020 in Community Q&A

Hello,

I want to use substring function in compose. For Example:

 Input : str  = 'GeeksForGeeks'         str.Substring(5); Output: ForGeeks

But I don't know its command in Compose. How can I cut string ?

Tagged:

Answers

  • manoj kandukuri
    manoj kandukuri
    Altair Employee
    edited February 2021

    Hi Batuhancoskun,

    As your variable 'str' is a string, you can get desired output by using indexing to get the 'letters' form the string

                --> str(6:end)

               output: ForGeeks

     

    if you want to split a string at a desired character/delimiter  you can use 'strplit', 'regexp'  functions. 

     

    Hope this helps :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

     

     

     

     

  • Batuhancoskun
    Batuhancoskun New Altair Community Member
    edited November 2019

    My problem solved. Thank you for your answer. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />