Check if string starts with a word but cut the rest

Hi all! I have a process that performs different actions based on string value. I have a series of flow decisions that controls the string. I have occured a problem with a certaint string “FRONTRUTE” and “FR” this conflics on the first flow decision where i said string.startswith FR, becuase it also takes the string “FRONTRUTE” i only want it to look for the “FR” String i tried with string = “FR” but that dont work since the string have “FR asdasdagseg321253” so a dynamic string after “FR”
Any idea ?

@langsem Can you tell us what should be the correct value that it should recognise ?

need something that says "if the word starts with FR and a space after FR then its correct, else its wrong "

@langsem You can use strVar.StartsWith("FR ") So there will be a Space after it.

Is this a correct value for your case?

found a solutiion this simply just say string.startswith(FR and space ) haha thanks for interest tho

1 Like