C# Class CTFBot.CTFUtils

Afficher le fichier Open project: countervandalism/Cluekie

Méthodes publiques

Méthode Description
ParseDateTimeLength ( string input, int defaultLen ) : int

Like PHP's strtotime() function, attempts to parse a GNU date/time into number of seconds

getRawDocument ( string url ) : string

Gets the raw source code for a URL

replaceStrMax ( string input, char oldChar, char newChar, int maxChars ) : string

Replaces up to the maximum number of old characters with new characters in a string

stringSplit ( string input, int chunkLen ) : ArrayList

Like PHP's str_split() function, splits a string into an array of chunks

wikiEncode ( string input ) : string

Encodes a string for use with wiki URLs

Method Details

ParseDateTimeLength() public static méthode

Like PHP's strtotime() function, attempts to parse a GNU date/time into number of seconds
public static ParseDateTimeLength ( string input, int defaultLen ) : int
input string String representation of date/time length
defaultLen int
Résultat int

getRawDocument() public static méthode

Gets the raw source code for a URL
public static getRawDocument ( string url ) : string
url string Location of the resource
Résultat string

replaceStrMax() public static méthode

Replaces up to the maximum number of old characters with new characters in a string
public static replaceStrMax ( string input, char oldChar, char newChar, int maxChars ) : string
input string The string to work on
oldChar char The character to replace
newChar char The character to insert
maxChars int The maximum number of instances to replace
Résultat string

stringSplit() public static méthode

Like PHP's str_split() function, splits a string into an array of chunks
public static stringSplit ( string input, int chunkLen ) : ArrayList
input string String to split
chunkLen int Maximum length of each chunk
Résultat System.Collections.ArrayList

wikiEncode() public static méthode

Encodes a string for use with wiki URLs
public static wikiEncode ( string input ) : string
input string
Résultat string