Click or drag to resize

PageHelperStripTitleDisambiguation Method

This is preliminary documentation and is subject to change.

Strips disambiguation part of the title from the full article title.

Namespace: WikiClientLibrary.Pages
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public static string StripTitleDisambiguation(
	string originalTitle
)

Parameters

originalTitle  String
The original full article title.

Return Value

String
The article title without disambiguation part, or the original title given if no such part can be found.
Exceptions
ExceptionCondition
ArgumentNullExceptionoriginalTitle is null.
Remarks

According to the current naming practice of disambiguation on Wikipedia, the page title with disambiguation part is like: Politics (Aristotle). Note there is a space before the left bracket. However, for the sake of compatibility, especially on the Wiki sites outside Wikimedia Projects, the method also handles the following cases

  • Politics(Aristotle) – Missing, or extra whitespaces before the bracket.
  • 政治学 (亚里士多德) – Full-width left bracket instead of half-width one.

For general concept on disambiguation, see Wikipedia:Disambiguation.

See Also