Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TrimEnd

Removes whitespace characters from the end of the string.
Read time 2 minutesLast updated 6 days ago

Definition

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

TrimEnd<T>(T)

Removes whitespace characters from the end of the string.
public static T TrimEnd<T>(this ref T fs) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A string to perform operation.

Returns

Type

Description

TReturns instance of this string with whitespace characters removed from the end of the string.

TrimEnd(UnsafeText, AllocatorHandle)

Removes whitespace characters from the end of the string.
public static UnsafeText TrimEnd(this ref UnsafeText fs, AllocatorManager.AllocatorHandle allocator)

Parameters

A UnsafeText string to perform operation.

The AllocatorManager.AllocatorHandle allocator type to use.

Returns

Type

Description

UnsafeTextReturns instance of this string with whitespace characters removed from the end of the string.

TrimEnd(NativeText, AllocatorHandle)

Removes whitespace characters from the end of the string.
public static NativeText TrimEnd(this ref NativeText fs, AllocatorManager.AllocatorHandle allocator)

Parameters

A NativeText string to perform operation.

The AllocatorManager.AllocatorHandle allocator type to use.

Returns

Type

Description

NativeTextReturns instance of this string with whitespace characters removed from the end of the string.

TrimEnd<T>(T, ReadOnlySpan<Rune>)

Removes specific characters from the end of the string.
public static T TrimEnd<T>(this ref T fs, ReadOnlySpan<Unicode.Rune> trimRunes) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A string to perform operation.

Runes that should be trimmed.

Returns

Type

Description

TReturns instance of this string with specific characters removed from the end of the string.

TrimEnd(UnsafeText, AllocatorHandle, ReadOnlySpan<Rune>)

Removes specific characters from the end of the string.
public static UnsafeText TrimEnd(this ref UnsafeText fs, AllocatorManager.AllocatorHandle allocator, ReadOnlySpan<Unicode.Rune> trimRunes)

Parameters

A UnsafeText string to perform operation.

The AllocatorManager.AllocatorHandle allocator type to use.

Runes that should be trimmed.

Returns

Type

Description

UnsafeTextReturns instance of this string with specific characters removed from the end of the string.

TrimEnd(NativeText, AllocatorHandle, ReadOnlySpan<Rune>)

Removes specific characters from the end of the string.
public static NativeText TrimEnd(this ref NativeText fs, AllocatorManager.AllocatorHandle allocator, ReadOnlySpan<Unicode.Rune> trimRunes)

Parameters

A NativeText string to perform operation.

The AllocatorManager.AllocatorHandle allocator type to use.

Runes that should be trimmed.

Returns

Type

Description

NativeTextReturns instance of this string with specific characters removed from the end of the string.