Skip to content

String Operations

Text manipulation: case conversion, split, pad, slugify, template, and more.

11 modules

ModuleDescription
Dize Küçük HarfDizeyi küçük harfe dönüştür
Pad StringPad a string to a specified length
Dize DeğiştirDizede alt dize geçişlerini değiştir
Dize Ters ÇevirDizideki karakterleri ters çevir
SlugifyConvert text to URL-friendly slug
Dize BölAyırıcı kullanarak dizeyi diziye böl
TemplateRender a template with variable substitution
Başlık Harfli DizeDizeyi başlık harfine dönüştür
Dize KırpDizenin her iki ucundan boşlukları kaldır
Truncate StringTruncate a string to a maximum length
Dize Büyük HarfDizeyi büyük harfe dönüştür

Modules

Dize Küçük Harf

string.lowercase

Dizeyi küçük harfe dönüştür

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process

Output:

FieldTypeDescription
resultstringKüçük harfe dönüştürülmüş dize
originalstringKüçük harfe dönüştürülmüş dize
statusstringKüçük harfe dönüştürülmüş dize

Pad String

string.pad

Pad a string to a specified length

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-Text to pad
lengthnumberYes-Text to pad
pad_charstringNoTarget length
positionstringNoendCharacter to pad with

Output:

FieldTypeDescription
resultstringPadded string
originalstringPadded string
addednumberPadded string

Dize Değiştir

string.replace

Dizede alt dize geçişlerini değiştir

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process
searchstringYes-The substring to search for in the input text
replacestringYes-Text to replace matches with (leave empty to remove matches)

Output:

FieldTypeDescription
resultstringDeğişiklikler uygulanmış dize
originalstringDeğişiklikler uygulanmış dize
searchstringDeğişiklikler uygulanmış dize
replacestringOrijinal giriş dizesi
statusstringDeğiştirilen arama dizesi

Dize Ters Çevir

string.reverse

Dizideki karakterleri ters çevir

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process

Output:

FieldTypeDescription
resultstringTers çevrilmiş dize
originalstringTers çevrilmiş dize
lengthnumberTers çevrilmiş dize

Slugify

string.slugify

Convert text to URL-friendly slug

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-Text to slugify
separatorstringNo-Text to slugify
lowercasebooleanNoTrueWord separator
max_lengthnumberNo0Convert to lowercase

Output:

FieldTypeDescription
resultstringMaximum slug length (0 = unlimited)
originalstringURL-friendly slug

Dize Böl

string.split

Ayırıcı kullanarak dizeyi diziye böl

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process
delimiterselect (,, ;, , , `
, , -, _`)NoCharacter(s) to split the string on

Output:

FieldTypeDescription
partsarrayBölünmüş dize parçaları dizisi
resultarrayBölünmüş dize parçaları dizisi
lengthnumberBölünmüş dize parçaları dizisi
originalstringParçalar için takma ad - bölünmüş dize parçaları dizisi
delimiterstringBölünmeden sonra parça sayısı
statusstringOrijinal giriş dizesi

Template

string.template

Render a template with variable substitution

Parameters:

NameTypeRequiredDefaultDescription
templatestringYes-Template string with {{variable}} placeholders
variablesobjectYes-Variables to substitute
missing_valuestringNo-Value for undefined variables
preserve_missingbooleanNoFalseValue for undefined variables

Output:

FieldTypeDescription
resultstringKeep placeholder if variable is missing
replacednumberRendered template
missingarrayRendered template

Başlık Harfli Dize

string.titlecase

Dizeyi başlık harfine dönüştür

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process

Output:

FieldTypeDescription
resultstringBaşlık harfine dönüştürülmüş dize

Example: Convert to title case

yaml
text: hello world from flyto

Example: Format name

yaml
text: john doe

Dize Kırp

string.trim

Dizenin her iki ucundan boşlukları kaldır

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process

Output:

FieldTypeDescription
resultstringBoşlukları kaldırılmış kırpılmış dize
originalstringBoşlukları kaldırılmış kırpılmış dize
statusstringBoşlukları kaldırılmış kırpılmış dize

Truncate String

string.truncate

Truncate a string to a maximum length

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-Text to truncate
lengthnumberYes-Text to truncate
suffixstringNo...Maximum length
word_boundarybooleanNoFalseText to append if truncated

Output:

FieldTypeDescription
resultstringBreak at word boundary
originalstringTruncated string
truncatedbooleanTruncated string
removednumberOriginal string

Dize Büyük Harf

string.uppercase

Dizeyi büyük harfe dönüştür

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-The text string to process

Output:

FieldTypeDescription
resultstringBüyük harfe dönüştürülmüş dize
originalstringBüyük harfe dönüştürülmüş dize
statusstringBüyük harfe dönüştürülmüş dize

Released under the Apache 2.0 License.