ee.String.trim

Renvoie une chaîne dont la valeur est la chaîne d'origine, sans les espaces de début et de fin.

UtilisationRenvoie
String.trim()Chaîne
ArgumentTypeDétails
ceci : stringChaîneChaîne à supprimer.

Exemples

Éditeur de code (JavaScript)

var s = ee.String('\t\n\r abc\t\n\r ');
print(s.trim());  // "abc"

var s = ee.String(' a\t\n\r b ');
print(s.trim());  // "a\t\n\r b"

Configuration de Python

Consultez la page Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.

import ee
import geemap.core as geemap

Colab (Python)

s = ee.String('\t\n\r abc\t\n\r ')
print(s.trim().getInfo())  # "abc"

s = ee.String(' a\t\n\r b ')
print(s.trim().getInfo())  # "a\t\n\r b"