Fonction Scilab
eng - fr


change_color_subtitle - modifie la couleur des sous-titres dans un fichier html

Librairie

Séquence d'appel

tt = change_color_subtitle(htmf,colorn)

Paramètres

Description

Add here a paragraph of the function description. Other paragraph can be added

Add here a paragraph of the function description

Exemple

Add here scilab instructions and comments

Contenu du fichier


//change_font_subtitle_color
//Fonction qui change la couleur des sous-titres
//d'une page d'aide html
//Entrée : htmf  : un nom de fichier à modifier
//         colorn : chaine de caractère la couleur à appliquer
//Sortie : tt le texte du fichier htm
function tt=change_color_subtitle(htmf,colorn)
 if fileinfo(htmf(1,1))<>[] then
  tt=mgetl(htmf(1,1));
  if tt<>[] then
   flagb='<H2>';
   flage='</H2>';
   printf("Change color of subtitles... ")
   for i=1:size(tt,1)
    a=strindex(tt(i),flagb);
    //disp(a)
    //pause
    if a<>[] then
     for j=1:size(a,1)
      //disp(tt(i))
      tt(i)=strsubst(tt(i),flagb,flagb+'<font color="""+colorn+""">')
      //disp(tt(i))
     end
    end
    b=strindex(tt(i),flage);
    if b<>[] then
     for j=1:size(b,1)
      tt(i)=strsubst(tt(i),flage,'</font>'+flage)
     end
    end
   end
   printf("Done\n")
  end
 else
  tt=[]
 end
endfunction

Fonction(s) utilisée(s)

Add here the used function name and references

Auteurs

enter here the author name Add here the author references