Difference between revisions of "ReNamer:Pascal Script:WideUpperCase"

From den4b Wiki
Jump to: navigation, search
(Created page with '==WideUpperCase or How to uppercase the filename== In this chapter we will learn how to achieve goals similar to the Case rule. First, we will uppercase the filename and lowerc...')
 
Line 3: Line 3:
 
In this chapter we will learn how to achieve goals similar to the Case rule.
 
In this chapter we will learn how to achieve goals similar to the Case rule.
  
First, we will uppercase the filename and lowercase the extention. We will use WideUpperCase and WideLowerCase functions that take a string as a parameter and return that string in proper case.
+
First, we will uppercase the filename and lowercase the extention. We will use '''WideUpperCase''' and '''WideLowerCase''' functions that take a string as a parameter and return that string in proper case.
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 9: Line 9:
 
</nowiki></pre>
 
</nowiki></pre>
  
We can also capitalize every word with WideCaseCapitalize function:
+
 
 +
We can also capitalize every word with '''WideCaseCapitalize''' function:
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 15: Line 16:
 
</nowiki></pre>
 
</nowiki></pre>
  
or invert case:
+
or invert case with '''WideCaseInvert''' function:
  
 
<pre><nowiki>
 
<pre><nowiki>

Revision as of 12:00, 27 May 2009

WideUpperCase or How to uppercase the filename

In this chapter we will learn how to achieve goals similar to the Case rule.

First, we will uppercase the filename and lowercase the extention. We will use WideUpperCase and WideLowerCase functions that take a string as a parameter and return that string in proper case.

FileName:=WideUpperCase(WideExtractBaseName(FileName))+WideLowerCase(WideExtractFileExt(FileName));


We can also capitalize every word with WideCaseCapitalize function:

FileName:= WideCaseCapitalize(WideExtractBaseName(FileName))+ WideExtractFileExt(FileName);

or invert case with WideCaseInvert function:

FileName:= WideCaseInvert(FileName);

Making only first letter capital is a bit more complex and will be described in the next chapter.