Difference between revisions of "ReNamer:Pascal Script:WideUpperCase"
Jump to navigation
Jump to 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...') |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | ==WideUpperCase or How to uppercase the filename== | + | {{Up|ReNamer:Pascal Script}} |
+ | |||
+ | == WideUpperCase or How to uppercase the filename == | ||
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. | + | ====UPPERCASE and lowercase==== |
+ | 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. | ||
− | < | + | <syntaxhighlight lang="pascal"> |
− | FileName:=WideUpperCase(WideExtractBaseName(FileName))+WideLowerCase(WideExtractFileExt(FileName)); | + | FileName := WideUpperCase(WideExtractBaseName(FileName)) |
− | </ | + | + WideLowerCase(WideExtractFileExt(FileName)); |
+ | </syntaxhighlight> | ||
− | We can also capitalize every word with WideCaseCapitalize function: | + | ====Capitalize Every Word==== |
+ | We can also capitalize every word with '''WideCaseCapitalize''' function: | ||
− | < | + | <syntaxhighlight lang="pascal"> |
− | FileName:= WideCaseCapitalize(WideExtractBaseName(FileName))+ WideExtractFileExt(FileName); | + | FileName := WideCaseCapitalize(WideExtractBaseName(FileName)) + |
− | </ | + | WideExtractFileExt(FileName); |
+ | </syntaxhighlight> | ||
− | + | ====iNVERT cASE==== | |
+ | For inverting case we will use '''WideCaseInvert''' function: | ||
− | < | + | <syntaxhighlight lang="pascal"> |
− | FileName:= WideCaseInvert(FileName); | + | FileName := WideCaseInvert(FileName); |
− | </ | + | </syntaxhighlight> |
+ | ====First letter capital==== | ||
Making only first letter capital is a bit more complex and will be described in the next chapter. | Making only first letter capital is a bit more complex and will be described in the next chapter. | ||
+ | |||
+ | [[Category:ReNamer]] | ||
+ | [[Category:Pascal Script]] |
Latest revision as of 15:04, 8 February 2017
WideUpperCase or How to uppercase the filename
In this chapter we will learn how to achieve goals similar to the Case rule.
UPPERCASE and lowercase
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));
Capitalize Every Word
We can also capitalize every word with WideCaseCapitalize function:
FileName := WideCaseCapitalize(WideExtractBaseName(FileName)) +
WideExtractFileExt(FileName);
iNVERT cASE
For inverting case we will use WideCaseInvert function:
FileName := WideCaseInvert(FileName);
First letter capital
Making only first letter capital is a bit more complex and will be described in the next chapter.