Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TrimStart

Removes whitespace characters from begining of the string.
Read time 2 minutesLast updated 8 days ago

Definition

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

TrimStart<T>(T)

Removes whitespace characters from begining of the string.
public static T TrimStart<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 start of the string.

TrimStart(UnsafeText, AllocatorHandle)

Removes whitespace characters from begining of the string.
public static UnsafeText TrimStart(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 start of the string.

TrimStart(NativeText, AllocatorHandle)

Removes whitespace characters from begining of the string.
public static NativeText TrimStart(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 start of the string.

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

Removes specific characters from begining of the string.
public static T TrimStart<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 start of the string.

TrimStart(UnsafeText, AllocatorHandle, ReadOnlySpan<Rune>)

Removes specific characters characters from begining of the string.
public static UnsafeText TrimStart(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 start of the string.

TrimStart(NativeText, AllocatorHandle, ReadOnlySpan<Rune>)

Removes specific characters from begining of the string.
public static NativeText TrimStart(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 start of the string.