File indexing completed on 2024-06-23 04:52:41

0001 /*
0002         SPDX-FileCopyrightText: 2007-2009 Sergio Pistone <sergio_pistone@yahoo.com.ar>
0003 
0004         SPDX-License-Identifier: GPL-2.0-or-later
0005 
0006         @category Examples
0007         @name Capitalize All Lines
0008         @version 1.0
0009         @summary Example script to capitalize first letter of each subtitle line.
0010         @author SubtitleComposer Team
0011 */
0012 
0013 let s = subtitle.instance();
0014 for(let i = 0, n = s.linesCount(); i < n; i++) {
0015         let line = s.line(i);
0016         let text = line.primaryText();
0017         line.setPrimaryText(text.left(1).toUpper().append(text.mid(1)));
0018 }