Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
strings.reverse
strings.reverse(STRING)
Descrizione
Restituisce una stringa che è l'inverso della stringa di input.
Tipi di dati dei parametri
STRING
Tipo restituito
STRING
Esempi di codice
Esempio 1
L'esempio seguente passa una stringa breve.
strings.reverse("str") = "rts" // The function returns 'rts'.
Esempio 2
L'esempio seguente passa una stringa vuota.
strings.reverse("") = ""
Esempio 3
L'esempio seguente supera un palindromo.
strings.reverse("tacocat") = "tacocat"
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-29 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003estrings.reverse\u003c/code\u003e function reverses the order of characters in a given string.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a single string (\u003ccode\u003eSTRING\u003c/code\u003e) as input and returns a reversed string (\u003ccode\u003eSTRING\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003ePassing an empty string to \u003ccode\u003estrings.reverse\u003c/code\u003e will return an empty string.\u003c/p\u003e\n"],["\u003cp\u003eIf a palindrome is passed to this function it will return the same string.\u003c/p\u003e\n"]]],[],null,["### strings.reverse\n\nSupported in: \n[Rules](/chronicle/docs/detection/default-rules) [Search](/chronicle/docs/investigation/udm-search) \n\n strings.reverse(STRING)\n\n#### Description\n\nReturns a string that is the reverse of the input string.\n\n#### Param data types\n\n`STRING`\n\n#### Return type\n\n`STRING`\n\n#### Code samples\n\n##### Example 1\n\nThe following example passes a short string. \n\n strings.reverse(\"str\") = \"rts\" // The function returns 'rts'.\n\n##### Example 2\n\nThe following example passes an empty string. \n\n strings.reverse(\"\") = \"\"\n\n##### Example 3\n\nThe following example passes a palindrome. \n\n strings.reverse(\"tacocat\") = \"tacocat\""]]