MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / tokenize_all

Method tokenize_all

atomic-core/src/diff/token/tokenizer.rs:113–115  ·  view source on GitHub ↗

Tokenize all content and return as a vector. Convenience method for one-off tokenization with default config. # Arguments `content` - The bytes to tokenize # Returns A vector of all tokens in the content. # Example ```rust use atomic_core::diff::token::Tokenizer; let tokens = Tokenizer::tokenize_all(b"let x = 1;"); assert!(tokens.len() > 0); ```

(content: &'a [u8])

Source from the content-addressed store, hash-verified

111 /// assert!(tokens.len() > 0);
112 /// ```
113 pub fn tokenize_all(content: &'a [u8]) -> Vec<Token<'a>> {
114 Self::new(content).collect()
115 }
116
117 /// Tokenize with custom configuration.
118 ///

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected