Sass str-insert() Function
You are Here:
Sass str-insert() Function
The str-insert()
function returns a copy of a string with a new letter(s) inserted at the specified index.
Example
SASS TO CSS CONVERTER
//Check your console
@debug str-insert("sansserif", "-", 5); // "sans-serif"
@debug str-insert("sansserif", "-", -6); // "sans-serif"
@debug str-insert("sansserif", "-", 100); // "sansserif-"
@debug str-insert("sansserif", "-", -100); // "-sansserif"
Syntax
str-insert($string, $insert, $index)
Parameter Value
Value | Type | Explanation |
---|---|---|
$string | Required | A string. |
$insert | Required | A string to be inserted |
$index | Required | A index number (a position to add 'insert string'). |
Return Value
Value | Explanation |
---|---|
string | Returns a copy of $string with $insert inserted at $index.
|
Reminder
Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in Sass.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.