C# 클래스 DotLiquid.StandardFilters

파일 보기 프로젝트 열기: dotliquid/dotliquid 1 사용 예제들

공개 메소드들

메소드 설명
Append ( string input, string @string ) : string

Add one string to another

Capitalize ( string input ) : string

capitalize words in the input sentence

Date ( object input, string format ) : string

Formats a date using a .NET date format string

Default ( string input, string @defaultValue ) : string

If a value isn't set for a variable in the template, allow the user to specify a default value for that variable

DividedBy ( object input, object operand ) : object

Division

Downcase ( string input ) : string

convert a input string to DOWNCASE

Escape ( string input ) : string
First ( IEnumerable array ) : object

Get the first element of the passed in array Example: {{ product.images | first | to_img }}

H ( string input ) : string
Join ( IEnumerable input ) : string

Join elements of the array with a certain character between them

Join ( IEnumerable input, string glue ) : string

Join elements of the array with a certain character between them

Last ( IEnumerable array ) : object

Get the last element of the passed in array Example: {{ product.images | last | to_img }}

Map ( IEnumerable input, string property ) : IEnumerable

Map/collect on a given property

Minus ( object input, object operand ) : object

Subtraction

Modulo ( object input, object operand ) : object
NewlineToBr ( string input ) : string

Add
tags in front of all newlines in input string

Plus ( object input, object operand ) : object

Addition

Prepend ( string input, string @string ) : string

Prepend a string to another

Remove ( string input, string @string ) : string

Remove a substring

RemoveFirst ( string input, string @string ) : string

Remove the first occurrence of a substring

Replace ( string input, string @string ) : string

Replace occurrences of a string with another

Replace ( string input, string @string, string replacement ) : string

Replace occurrences of a string with another

ReplaceFirst ( string input, string @string ) : string

Replace the first occurence of a string with another

ReplaceFirst ( string input, string @string, string replacement ) : string

Replace the first occurence of a string with another

Round ( object input, object places = null ) : object
Size ( object input ) : int

Return the size of an array or of an string

Slice ( string input, int start, int len = 1 ) : string

Return a Part of a String

Sort ( object input ) : IEnumerable

Sort elements of the array provide optional property with which to sort an array of hashes or drops

Sort ( object input, string property ) : IEnumerable

Sort elements of the array provide optional property with which to sort an array of hashes or drops

Split ( string input, string pattern ) : string[]

Split input string into an array of substrings separated by given pattern.

StripHtml ( string input ) : string
StripNewlines ( string input ) : string

Remove all newlines from the string

Times ( object input, object operand ) : object

Multiplication

Truncate ( string input ) : string

Truncates a string down to 15 characters

Truncate ( string input, int length ) : string

Truncates a string down to length characters

Truncate ( string input, int length, string truncateString ) : string

Truncates a string down to x characters

TruncateWords ( string input ) : string
TruncateWords ( string input, int words ) : string
TruncateWords ( string input, int words, string truncateString ) : string
Upcase ( string input ) : string

convert a input string to UPCASE

UrlEncode ( string input ) : string

convert a input string to URLENCODE

비공개 메소드들

메소드 설명
DoMathsOperation ( object input, object operand, Func operation ) : object
IsReal ( object o ) : bool

메소드 상세

Append() 공개 정적인 메소드

Add one string to another
public static Append ( string input, string @string ) : string
input string
@string string
리턴 string

Capitalize() 공개 정적인 메소드

capitalize words in the input sentence
public static Capitalize ( string input ) : string
input string
리턴 string

Date() 공개 정적인 메소드

Formats a date using a .NET date format string
public static Date ( object input, string format ) : string
input object
format string
리턴 string

Default() 공개 정적인 메소드

If a value isn't set for a variable in the template, allow the user to specify a default value for that variable
public static Default ( string input, string @defaultValue ) : string
input string
@defaultValue string
리턴 string

DividedBy() 공개 정적인 메소드

Division
public static DividedBy ( object input, object operand ) : object
input object
operand object
리턴 object

Downcase() 공개 정적인 메소드

convert a input string to DOWNCASE
public static Downcase ( string input ) : string
input string
리턴 string

Escape() 공개 정적인 메소드

public static Escape ( string input ) : string
input string
리턴 string

First() 공개 정적인 메소드

Get the first element of the passed in array Example: {{ product.images | first | to_img }}
public static First ( IEnumerable array ) : object
array IEnumerable
리턴 object

H() 공개 정적인 메소드

public static H ( string input ) : string
input string
리턴 string

Join() 공개 정적인 메소드

Join elements of the array with a certain character between them
public static Join ( IEnumerable input ) : string
input IEnumerable
리턴 string

Join() 공개 정적인 메소드

Join elements of the array with a certain character between them
public static Join ( IEnumerable input, string glue ) : string
input IEnumerable
glue string
리턴 string

Last() 공개 정적인 메소드

Get the last element of the passed in array Example: {{ product.images | last | to_img }}
public static Last ( IEnumerable array ) : object
array IEnumerable
리턴 object

Map() 공개 정적인 메소드

Map/collect on a given property
public static Map ( IEnumerable input, string property ) : IEnumerable
input IEnumerable
property string
리턴 IEnumerable

Minus() 공개 정적인 메소드

Subtraction
public static Minus ( object input, object operand ) : object
input object
operand object
리턴 object

Modulo() 공개 정적인 메소드

public static Modulo ( object input, object operand ) : object
input object
operand object
리턴 object

NewlineToBr() 공개 정적인 메소드

Add
tags in front of all newlines in input string
public static NewlineToBr ( string input ) : string
input string
리턴 string

Plus() 공개 정적인 메소드

Addition
public static Plus ( object input, object operand ) : object
input object
operand object
리턴 object

Prepend() 공개 정적인 메소드

Prepend a string to another
public static Prepend ( string input, string @string ) : string
input string
@string string
리턴 string

Remove() 공개 정적인 메소드

Remove a substring
public static Remove ( string input, string @string ) : string
input string
@string string
리턴 string

RemoveFirst() 공개 정적인 메소드

Remove the first occurrence of a substring
public static RemoveFirst ( string input, string @string ) : string
input string
@string string
리턴 string

Replace() 공개 정적인 메소드

Replace occurrences of a string with another
public static Replace ( string input, string @string ) : string
input string
@string string
리턴 string

Replace() 공개 정적인 메소드

Replace occurrences of a string with another
public static Replace ( string input, string @string, string replacement ) : string
input string
@string string
replacement string
리턴 string

ReplaceFirst() 공개 정적인 메소드

Replace the first occurence of a string with another
public static ReplaceFirst ( string input, string @string ) : string
input string
@string string
리턴 string

ReplaceFirst() 공개 정적인 메소드

Replace the first occurence of a string with another
public static ReplaceFirst ( string input, string @string, string replacement ) : string
input string
@string string
replacement string
리턴 string

Round() 공개 정적인 메소드

public static Round ( object input, object places = null ) : object
input object
places object
리턴 object

Size() 공개 정적인 메소드

Return the size of an array or of an string
public static Size ( object input ) : int
input object
리턴 int

Slice() 공개 정적인 메소드

Return a Part of a String
public static Slice ( string input, int start, int len = 1 ) : string
input string
start int
len int
리턴 string

Sort() 공개 정적인 메소드

Sort elements of the array provide optional property with which to sort an array of hashes or drops
public static Sort ( object input ) : IEnumerable
input object
리턴 IEnumerable

Sort() 공개 정적인 메소드

Sort elements of the array provide optional property with which to sort an array of hashes or drops
public static Sort ( object input, string property ) : IEnumerable
input object
property string
리턴 IEnumerable

Split() 공개 정적인 메소드

Split input string into an array of substrings separated by given pattern.
public static Split ( string input, string pattern ) : string[]
input string
pattern string
리턴 string[]

StripHtml() 공개 정적인 메소드

public static StripHtml ( string input ) : string
input string
리턴 string

StripNewlines() 공개 정적인 메소드

Remove all newlines from the string
public static StripNewlines ( string input ) : string
input string
리턴 string

Times() 공개 정적인 메소드

Multiplication
public static Times ( object input, object operand ) : object
input object
operand object
리턴 object

Truncate() 공개 정적인 메소드

Truncates a string down to 15 characters
public static Truncate ( string input ) : string
input string
리턴 string

Truncate() 공개 정적인 메소드

Truncates a string down to length characters
public static Truncate ( string input, int length ) : string
input string
length int
리턴 string

Truncate() 공개 정적인 메소드

Truncates a string down to x characters
public static Truncate ( string input, int length, string truncateString ) : string
input string
length int
truncateString string
리턴 string

TruncateWords() 공개 정적인 메소드

public static TruncateWords ( string input ) : string
input string
리턴 string

TruncateWords() 공개 정적인 메소드

public static TruncateWords ( string input, int words ) : string
input string
words int
리턴 string

TruncateWords() 공개 정적인 메소드

public static TruncateWords ( string input, int words, string truncateString ) : string
input string
words int
truncateString string
리턴 string

Upcase() 공개 정적인 메소드

convert a input string to UPCASE
public static Upcase ( string input ) : string
input string
리턴 string

UrlEncode() 공개 정적인 메소드

convert a input string to URLENCODE
public static UrlEncode ( string input ) : string
input string
리턴 string