C# 클래스 CTFBot.CTFUtils

파일 보기 프로젝트 열기: countervandalism/Cluekie

공개 메소드들

메소드 설명
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

메소드 상세

ParseDateTimeLength() 공개 정적인 메소드

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
리턴 int

getRawDocument() 공개 정적인 메소드

Gets the raw source code for a URL
public static getRawDocument ( string url ) : string
url string Location of the resource
리턴 string

replaceStrMax() 공개 정적인 메소드

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
리턴 string

stringSplit() 공개 정적인 메소드

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
리턴 System.Collections.ArrayList

wikiEncode() 공개 정적인 메소드

Encodes a string for use with wiki URLs
public static wikiEncode ( string input ) : string
input string
리턴 string