Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

String manipulation on both start and end

(0) ShareShare
ReportReport
Posted on by 48

Hello,

 

I have a variable called varBase which has a looooong string value inside. 

I want to "trim it" and especially delete some characters on both start and end of this value. 

I have managed to remove the first 22 characters that I want out, by using :
Right(varBase, Len(varBase) -22)

 

However, simultaneously i want to remove the double quote character "  [Ascii 34 / Char(34)] at the end.
Any ideas anyone?

Categories:
  • SmoothOperator Profile Picture
    SmoothOperator 48 on at
    Re: String manipulation on both start and end

    really appreciate your quick responses!!! @Drrickryp @rubin_boer 

     

  • Drrickryp Profile Picture
    Drrickryp on at
    Re: String manipulation on both start and end

     

    @SmoothOperator 

    Substitute(Right(varBase, Len(varBase) -22),""","")

    if there was only one " in the string.  If there are more and you want to replace the last one

    With(
     {no:CountRows(MatchAll(varBase, """)),
    Substitute(Right(varBase, Len(varBase) -22),""","",no)

     

  • Verified answer
    rubin_boer Profile Picture
    rubin_boer 4,806 on at
    Re: String manipulation on both start and end

    hi @SmoothOperator  Mid(Right(varBase, Len(varBase) -22),1,len(Right(varBase, Len(varBase) -22))-1)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard