# Release Notes: 12/22/20 - Expressions: STARTSWITH() and ENDSWITH()

Hi all,

We’re making two new functions available for you this week. They let you check if your text starts or ends with a certain string.

Documentation is available at:

15 Likes

This is cool.
It’s interesting that FIND() and IN() have reversed needle/haystack than these and contains…

Find needle in haystack.

Haystack contains needle.

Haystack starts/ends with needle.

Grammatically correct!

12 Likes

@Steve
Awesome approach mate!

4 Likes

Wouldn’t the needle be in the MIDDLE of the Haystack. Otherwise, there would be no need to look for the needle in the first place!

2 Likes

hahahaha.
Well how about the needle is beside the haystack…

2 Likes

Thank you @Arthur_Rallu and @Steve

The functions appear to be specialized or specific versions of CONTAINS()

CONTAINS() finds needle anywhere in the haystack. These functions find the needles at the start or end of the haystack.

4 Likes

Well how about the needle is beside the haystack…
[/quote]

Now you’re searching in a neighboring column!

2 Likes

I’ve always appreciated how the parameters in these functions were arranged. You just insert the function name between them.

2 Likes

Startswidth([value1],[Value2]) true or false
If(left([value1],len([value2])=[value2],”true”,”false”)

Endswith ([value1],[Value2]) true or false
If(right([value1],len([value2])=[value2],”true”,”false”)

While there was a solution, I wondered if such solutions were needed! @Steve

These:

``````If(left([value1],len([value2])=[value2],”true”,”false”)
If(right([value1],len([value2])=[value2],”true”,”false”)
``````

are more simply expressed as just:

``````left([value1],len([value2])=[value2]
right([value1],len([value2])=[value2]
``````

The use of IF() is redundant.

2 Likes

boom

always thx to appsheet team…

2 Likes