Module:PageNameManipulate/doc

Description
This module is used to get selected parts of a page's name and is usually used in templates such as Template:CategoryTexts.

RemoveFromRight
Use this to get the pagename from the start until a selected point on the right, like this:

WhereToStop is the position of the last character to be selected. Don't forget to account for spaces as well.

Example
If you're on a page called "This is a test" and you want to get "This is", the code would be, since the "s" in "is" is in the 7th position.

Alternatively, you can also count positions from last to first using negative numbers. The previous example could be achieved with the code, since the the "s" in "is" is in the 8th position counting from last to first.

RemoveFromLeft
Use this to get the pagename from a selected point on the left until the end, like this:

WhereToStart is the position of the first character to be selected. Don't forget to account for spaces as well.

Example
If you're on a page called "This is a test" and you want to get "a test", the code would be, since the "a" is in the 9th position.

Alternatively, you can also count positions from last to first using negative numbers. The previous example could be achieved with the code, since the "a" is in the 6th position counting from last to first.

RemoveFromBoth
Use this to get the pagename from a selected point on the left until a selected point on the right, like this:

WhereToStart is the position of the first character to be selected. WhereToStop is the position of the last character to be selected. Don't forget to account for spaces as well.

Example
If you're on a page called "This is a test" and you want to get "is a", the code would be, since the "i" in "is" is in the 6th position and the "a" is  in the 9th position.

Alternatively, you can also count positions from last to first using negative numbers. The previous example could be achieved with the code, since the "i" in "is" is in the 9th position counting from last to first and the "a" is  in the 6th position counting from last to first.

FirstWord
Use this to get the first word in a page's name, like this:

Example
If you're on a page called "This is a test" and you want to get "This", the code would be simply

WhatsBetween
Use this to get the part of a pagename between two words, like this: BetweenStart is the word right before what you want to select and BetweenEnd is the word right after what you want to select.

Example
If you're on a page called "This is a test" and you want to get "is a", the code would be, since "This" is right before "is" and "test" is right after "a".