Skip to main content

join_optimized

Function join_optimized 

Source
pub fn join_optimized(parts: &[&str], delimiter: &str) -> String
Expand description

Join string parts with a delimiter, optimizing for common cases

This function efficiently joins string parts using pre-calculated sizing to minimize allocations.

§Arguments

  • parts - The string parts to join
  • delimiter - The delimiter to use between parts

§Returns

A new string with all parts joined