Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Opérations à cordes
Résumé
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (UTC)."],[],[],null,["# String Ops\n==========\n\nSummary\n-------\n\n| ### Classes ||\n|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::AsString](/versions/r2.0/api_docs/cc/class/tensorflow/ops/as-string) | Converts each entry in the given tensor to strings. |\n| [tensorflow::ops::DecodeBase64](/versions/r2.0/api_docs/cc/class/tensorflow/ops/decode-base64) | Decode web-safe base64-encoded strings. |\n| [tensorflow::ops::EncodeBase64](/versions/r2.0/api_docs/cc/class/tensorflow/ops/encode-base64) | Encode strings into web-safe base64 format. |\n| [tensorflow::ops::ReduceJoin](/versions/r2.0/api_docs/cc/class/tensorflow/ops/reduce-join) | Joins a string [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) across the given dimensions. |\n| [tensorflow::ops::RegexFullMatch](/versions/r2.0/api_docs/cc/class/tensorflow/ops/regex-full-match) | Check if the input matches the regex pattern. |\n| [tensorflow::ops::RegexReplace](/versions/r2.0/api_docs/cc/class/tensorflow/ops/regex-replace) | Replaces matches of the `pattern` regular expression in `input` with the replacement string provided in `rewrite`. |\n| [tensorflow::ops::StringFormat](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-format) | Formats a string template using a list of tensors. |\n| [tensorflow::ops::StringJoin](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-join) | Joins the strings in the given list of string tensors into one tensor;. |\n| [tensorflow::ops::StringLength](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-length) | String lengths of `input`. |\n| [tensorflow::ops::StringLower](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-lower) | TODO: add doc. |\n| [tensorflow::ops::StringNGrams](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-n-grams) | Creates ngrams from ragged string data. |\n| [tensorflow::ops::StringSplit](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-split) | Split elements of `input` based on `delimiter` into a `SparseTensor`. |\n| [tensorflow::ops::StringSplitV2](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-split-v2) | Split elements of `source` based on `sep` into a `SparseTensor`. |\n| [tensorflow::ops::StringStrip](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-strip) | Strip leading and trailing whitespaces from the [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor). |\n| [tensorflow::ops::StringToHashBucket](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-to-hash-bucket) | Converts each string in the input [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) to its hash mod by a number of buckets. |\n| [tensorflow::ops::StringToHashBucketFast](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-to-hash-bucket-fast) | Converts each string in the input [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) to its hash mod by a number of buckets. |\n| [tensorflow::ops::StringToHashBucketStrong](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-to-hash-bucket-strong) | Converts each string in the input [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) to its hash mod by a number of buckets. |\n| [tensorflow::ops::StringUpper](/versions/r2.0/api_docs/cc/class/tensorflow/ops/string-upper) | TODO: add doc. |\n| [tensorflow::ops::Substr](/versions/r2.0/api_docs/cc/class/tensorflow/ops/substr) | Return substrings from [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of strings. |\n| [tensorflow::ops::UnicodeScript](/versions/r2.0/api_docs/cc/class/tensorflow/ops/unicode-script) | Determine the script codes of a given tensor of Unicode integer code points. |\n| [tensorflow::ops::UnicodeTranscode](/versions/r2.0/api_docs/cc/class/tensorflow/ops/unicode-transcode) | Transcode the input text from a source encoding to a destination encoding. |\n| [tensorflow::ops::UnsortedSegmentJoin](/versions/r2.0/api_docs/cc/class/tensorflow/ops/unsorted-segment-join) | Joins the elements of `inputs` based on `segment_ids`. |"]]