EndsWith

Tests whether a string ends with a specified suffix using case-sensitive comparison.

Syntax

EndsWith(source, suffix)

Parameters

  • source (string): The source string to test
  • suffix (string): The suffix to search for

Returns

  • boolean: True if the source string ends with the suffix

Description

Performs case-sensitive string suffix comparison using ordinal string comparison semantics.

Examples

var result1 = EndsWith("Hello World", "World")    # Returns true
var result2 = EndsWith("filename.txt", ".txt")    # Returns true
var result3 = EndsWith("Hello", "world")          # Returns false (case-sensitive)
var result4 = EndsWith("test", "testing")         # Returns false

Back to top

Copyright © Mesch Systems. All rights reserved.