mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 12:21:02 +01:00
61 lines
1.6 KiB
Plaintext
61 lines
1.6 KiB
Plaintext
print('-- empty, notEmpty, length, lower, upper, reverse --')
|
|
if (empty('') and notEmpty('234')) print(length('123'))
|
|
if (lower('Tdd4gh') == 'tdd4gh') print(upper('test'))
|
|
print(reverse('spinner'))
|
|
print('')
|
|
print('-- encodeURLComponent, decodeURLComponent --')
|
|
print(encodeURLComponent('http://www.google.com'))
|
|
print(encodeURLComponent('tom & jerry'))
|
|
print(decodeURLComponent(encodeURLComponent('http://www.google.com')))
|
|
print(decodeURLComponent(encodeURLComponent('tom & jerry')))
|
|
print('')
|
|
print('-- base64Encode, base64Decode --')
|
|
print(base64Encode('http://www.google.com'))
|
|
print(base64Encode('tom & jerry'))
|
|
print(base64Decode(base64Encode('http://www.google.com')))
|
|
print(base64Decode(base64Encode('tom & jerry')))
|
|
print('')
|
|
print('-- empty --')
|
|
print(empty(null))
|
|
print(empty(0))
|
|
print(empty(1))
|
|
print(empty(-1))
|
|
print(empty(0.0))
|
|
print(empty(0.01))
|
|
print(empty(''))
|
|
print(empty('string'))
|
|
print(empty('0'))
|
|
print(empty([]))
|
|
print(empty({}))
|
|
print(empty(tuple()))
|
|
print(empty(tuple(0)))
|
|
print(empty(tuple(1,2)))
|
|
print(empty(true))
|
|
print(empty(false))
|
|
print('')
|
|
print('-- notEmpty --')
|
|
print(notEmpty(null))
|
|
print(notEmpty(0))
|
|
print(notEmpty(1))
|
|
print(notEmpty(-1))
|
|
print(notEmpty(0.0))
|
|
print(notEmpty(0.01))
|
|
print(notEmpty(''))
|
|
print(notEmpty('string'))
|
|
print(notEmpty('0'))
|
|
print(notEmpty([]))
|
|
print(notEmpty({}))
|
|
print(notEmpty(tuple()))
|
|
print(notEmpty(tuple(0)))
|
|
print(notEmpty(tuple(1,2)))
|
|
print(notEmpty(true))
|
|
print(notEmpty(false))
|
|
print('')
|
|
print('-- replaceAll, replaceOne --')
|
|
print(replaceAll('hello world', 'l', 'L'))
|
|
print(replaceOne('hello world', 'l', 'L'))
|
|
print('')
|
|
print('-- generateUUIDv4 --')
|
|
print(length(generateUUIDv4()))
|
|
|