Talking about the length of the string

zhaozj2021-02-16  136

The string length calculation is the easiest, saying that this topic is inevitably joke, but if the calculated string has a specific requirement, it is a bit a little bit. Master can naturally skip, not reading, lest I am laughing. Recently, the news release system, the title cannot be super, so you have to make a script to calculate the length (here is mainly Java, JavaScript), ask the English in the title, Chinese calculate a word long, The label cannot be considered, the label is designed to display the title color on the page. Therefore, there is the following script