Search notes:

vim script: string manipulation

" run_ string_manipulation

redir > string_manipulation.out

let s:text = '0123456789'

echo s:text[4]
" 4

echo s:text[4:7]
" 4567

echo s:text[7:]
" 789

let s:begin  = 2
let s:length = 4

echo s:text[s:begin : s:length+s:begin-1]
" 2345

redir END

q
Github repository about-vim, path: /vimscript/string_manipulation.vim

See also

VIM script

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759561894, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/vim/script/vimscript/string_manipulation(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78