Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EndsWith

Returns true if a given character occurs at the end of this string.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

EndsWith<T>(T, Rune)

Returns true if a given character occurs at the end of this string.
public static bool EndsWith<T>(this ref T fs, Unicode.Rune rune) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A string to search.

rune

A character to search for within this string.

Returns

Type

Description

boolTrue if the character occurs at the end of this string.

EndsWith<T, U>(T, T)

Returns true if a given substring occurs at the end of this string.
public static bool EndsWith<T, U>(this ref T fs, in U other) where T : unmanaged, INativeList<byte>, IUTF8Bytes where U : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A string to search.

other

T
A substring to search for within this string.

Returns

Type

Description

boolTrue if the substring occurs at the end of this string.