Tutorialsplane

Vue.Js String Substr


This method is used to extract the characters from a string beginning form specified character to the number of characters. You can use this function same as native JavaScript. You can also use our online editor to edit and run the code online.


Vue.Js String Substr Method Example

You can use substr function in vue.js simply as below-

Example:

<div id="app">
	<div id="myId" ref="myId">{{ substr }}</div>
	<button>Click Me</button>
</div>
  

Try it ยป

Output of above example-