User:Frap/Reverse domain name notation: Difference between revisions
Content added Content deleted
m (Paddy3118 moved page Reverse domain name notation to User:Frap/Reverse domain name notation: Not task-like enough) |
(Added C#) |
||
Line 1: | Line 1: | ||
Encyclopedic article can be found on [[wp:Reverse domain name notation|Wikipedia]]. |
Encyclopedic article can be found on [[wp:Reverse domain name notation|Wikipedia]]. |
||
=={{header|C sharp|C#}}== |
|||
<lang csharp>/// <summary> |
|||
/// Reverses a domain name. |
|||
/// </summary> |
|||
/// <param name="domain">A domain name.</param> |
|||
/// <returns>A string with the domain name reversed.</returns> |
|||
private static string ReverseDomainNameNotation(string domain) |
|||
{ |
|||
return string.Join(".", domain.Split('.').Reverse()); |
|||
}</lang> |
|||
=={{header|JavaScript}}== |
=={{header|JavaScript}}== |