mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
74 lines
1.5 KiB
Text
74 lines
1.5 KiB
Text
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
Justification (input string 'abc')
|
|
----------------------------------
|
|
ljust: 'abc'
|
|
ljust: 'abc'
|
|
ljust: 'abc '
|
|
ljust: 'abc--'
|
|
rjust: 'abc'
|
|
rjust: 'abc'
|
|
rjust: ' abc'
|
|
rjust: '--abc'
|
|
zfill: 'abc'
|
|
zfill: 'abc'
|
|
zfill: '00abc'
|
|
|
|
Content checking
|
|
----------------
|
|
is_num abc : 0
|
|
is_num 123 : 1
|
|
is_num '' : 0
|
|
is_alpha ab : 1
|
|
is_alpha 1a : 0
|
|
is_alpha a1 : 0
|
|
is_alpha '' : 0
|
|
is_alnum ab : 1
|
|
is_alnum 1a : 1
|
|
is_alnum a1 : 1
|
|
is_alnum 12 : 1
|
|
is_alnum ##12: 0
|
|
is_alnum '' : 0
|
|
|
|
String counting (input str 'aabbaa')
|
|
------------------------------------
|
|
count_substr aa: 2
|
|
count_substr bb: 1
|
|
count_substr cc: 0
|
|
|
|
Starts/endswith
|
|
---------------
|
|
starts_with bro: 1
|
|
starts_with ids: 0
|
|
ends_with ids: 1
|
|
ends_with bro: 0
|
|
ends_with containing null: 1
|
|
|
|
Transformations
|
|
---------------
|
|
swap_case 'aBc': AbC
|
|
to_title 'bro is a very neat ids': 'Bro Is A Very Neat Ids'
|
|
to_title ' ': ' '
|
|
to_title ' a c ': ' A C '
|
|
remove_prefix 'banana'/'ba' : nana
|
|
remove_prefix 'bantana'/'ba': ntana
|
|
remove_prefix 'bantana'/'ab': bantana
|
|
remove_suffix 'banana'/'na' : ba
|
|
remove_suffix 'bantana'/'na': banta
|
|
remove_suffix 'bantana'/'an': bantana
|
|
|
|
find_str/rfind_str (input string 'abcdefghi')
|
|
-----------------------------------------------------
|
|
find_str: 0
|
|
find_str: -1
|
|
find_str: -1
|
|
find_str: 4
|
|
find_str: 4
|
|
find_str: 0
|
|
find_str: -1
|
|
find_str: -1
|
|
find_str: 4
|
|
find_str: 4
|
|
|
|
string_cat
|
|
-----------------------------------------------------
|
|
string_cat: abc
|