You might checkout truncate_html and consider combining your functionality into there as options.
\Peter
You might checkout truncate_html and consider combining your functionality into there as options.
\Peter
It seems use for content contains html tag, while i process for pure string without html tag