Using Javascript first get all the elements in the document that have that specific class.
Then iterate through them, picking up their innerHTML and getting just the first 10 characters.
Note: this snippet assumes that the innerHTMLs have only text, with no additional HTML markup in them.
const elements = document.querySelectorAll('.maocular');console.log(elements);
elements.forEach(element => {
element.innerHTML = element.innerHTML.substring(0,10);
});
<h4>
<p class="maocular">12 Chicken Franks Sausage</p>
</h4>