function persiantools_insert_str in PersianTools 7
A simple function to insert a unicode char in a str.
2 calls to persiantools_insert_str()
- persiantools_convert_sm in ./
persiantools.module - Main function for multiple features and fixes of persiantools module.
- persiantools_fix_mixed_path in ./
persiantools.module - Fix mixed-up paths in rtl blocks. Logic: Gets triggered once a starting '.' or '/' is detected after a whitespace. The correcting symbol is inserted once an english char is seen inside the path.
File
- ./
persiantools.module, line 379 - Adds common features and fixes for persian pages.
Code
function persiantools_insert_str($str, $char, $pos) {
return drupal_substr($str, 0, $pos) . $char . drupal_substr($str, $pos);
}