Difference between revisions of "ReNamer:Pascal Script:WideUpperCase"
Jump to navigation
Jump to search
(→WideUpperCase or How to uppercase the filename: code tags) |
|||
Line 1: | Line 1: | ||
− | ==WideUpperCase or How to uppercase the filename== | + | == 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. | 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. | ||
− | < | + | <source> |
− | FileName:=WideUpperCase(WideExtractBaseName(FileName))+WideLowerCase(WideExtractFileExt(FileName)); | + | FileName := WideUpperCase(WideExtractBaseName(FileName)) |
− | </ | + | + WideLowerCase(WideExtractFileExt(FileName)); |
− | + | </source> | |
We can also capitalize every word with '''WideCaseCapitalize''' function: | We can also capitalize every word with '''WideCaseCapitalize''' function: | ||
− | < | + | <source> |
− | FileName:= WideCaseCapitalize(WideExtractBaseName(FileName))+ WideExtractFileExt(FileName); | + | FileName := WideCaseCapitalize(WideExtractBaseName(FileName)) + |
− | </ | + | WideExtractFileExt(FileName); |
+ | </source> | ||
or invert case with '''WideCaseInvert''' function: | or invert case with '''WideCaseInvert''' function: | ||
− | < | + | <source> |
− | FileName:= WideCaseInvert(FileName); | + | FileName := WideCaseInvert(FileName); |
− | </ | + | </source> |
− | |||
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. |
Revision as of 02:11, 3 August 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.