ENDSWITH (NoSQL query)
APPLIES TO: NoSQL
Returns a boolean value indicating whether the first string expression ends with the second.
Syntax
ENDSWITH(<string_expr_1>, <string_expr_2> [, <bool_expr>])
Arguments
Description | |
---|---|
string_expr_1 |
A string expression. |
string_expr_2 |
A string expression to be compared to the end of string_expr_1 . |
bool_expr (Optional) |
Optional value for ignoring case. When set to true , ENDSWITH does a case-insensitive search. When unspecified, this default value is false . |
Return types
Returns a boolean expression.
Examples
The following example checks if the string abc
ends with b
or bC
.
SELECT VALUE {
endsWithWrongSuffix: ENDSWITH("AdventureWorks", "Adventure"),
endsWithCorrectSuffix: ENDSWITH("AdventureWorks", "Works"),
endsWithSuffixWrongCase: ENDSWITH("AdventureWorks", "works"),
endsWithSuffixCaseInsensitive: ENDSWITH("AdventureWorks", "works", true)
}
[
{
"endsWithWrongSuffix": false,
"endsWithCorrectSuffix": true,
"endsWithSuffixWrongCase": false,
"endsWithSuffixCaseInsensitive": true
}
]
Remarks
- This function performs a full index scan.
Related content
प्रतिक्रिया
https://aka.ms/ContentUserFeedback.
जल्द आ रहा है: 2024 के दौरान हम सामग्री के लिए फीडबैक तंत्र के रूप में GitHub मुद्दों को चरणबद्ध तरीके से समाप्त कर देंगे और इसे एक नई फीडबैक प्रणाली से बदल देंगे. अधिक जानकारी के लिए, देखें:के लिए प्रतिक्रिया सबमिट करें और देखें