स्ट्रिंग फ़ंक्शन
| नाम | ब्यौरा |
BYTE_LENGTH
|
STRING या BYTES वैल्यू में मौजूद BYTES की संख्या दिखाता है
|
CHAR_LENGTH
|
किसी STRING वैल्यू में यूनिकोड वर्णों की संख्या दिखाता है
|
STARTS_WITH
|
अगर कोई STRING, दिए गए प्रीफ़िक्स से शुरू होता है, तो TRUE दिखाता है
|
ENDS_WITH
|
अगर कोई STRING दिए गए पोस्टफ़िक्स पर खत्म होता है, तो TRUE दिखाता है
|
LIKE
|
अगर कोई STRING किसी पैटर्न से मैच होता है, तो TRUE दिखाता है
|
REGEX_CONTAINS
|
अगर कोई वैल्यू, रेगुलर एक्सप्रेशन से कुछ हद तक या पूरी तरह मैच करती है, तो यह फ़ंक्शन TRUE दिखाता है
|
REGEX_MATCH
|
अगर वैल्यू का कोई भी हिस्सा रेगुलर एक्सप्रेशन से मैच करता है, तो TRUE दिखाता है
|
STRING_CONCAT
|
यह फ़ंक्शन, कई STRING को एक STRING में जोड़ता है
|
STRING_CONTAINS
|
अगर किसी वैल्यू में TRUE मौजूद है, तो TRUE दिखाता हैSTRING
|
TO_UPPER
|
यह STRING या BYTES वैल्यू को अपरकेस में बदलता है.
|
TO_LOWER
|
STRING या BYTES वैल्यू को अंग्रेज़ी के छोटे अक्षरों में बदलता है.
|
SUBSTRING
|
STRING या BYTES वैल्यू का सबस्ट्रिंग मिलता है.
|
STRING_REVERSE
|
STRING या BYTES वैल्यू को उलट देता है.
|
TRIM
|
यह फ़ंक्शन, STRING या BYTES वैल्यू से पहले और बाद के वर्णों को हटाता है.
|
SPLIT
|
यह STRING या BYTES वैल्यू को ऐरे में बांटता है.
|
BYTE_LENGTH
सिंटैक्स:
byte_length[T <: STRING | BYTES](value: T) -> INT64
ब्यौरा:
यह फ़ंक्शन, STRING या BYTES वैल्यू में मौजूद BYTES की संख्या दिखाता है.
उदाहरण:
| value | byte_length(value) |
|---|---|
| "abc" | 3 |
| "xyzabc" | 6 |
| b"abc" | 3 |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("title").byteLength().as("titleByteLength") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("title").byteLength().as("titleByteLength") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("title").byteLength().alias("titleByteLength") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("title").byteLength().alias("titleByteLength") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select(Field.of("title").byte_length().as_("titleByteLength")) .execute() )
CHAR_LENGTH
सिंटैक्स:
char_length(value: STRING) -> INT64
ब्यौरा:
STRING वैल्यू में यूनिकोड कोड पॉइंट की संख्या दिखाता है.
उदाहरण:
| value | char_length(value) |
|---|---|
| "abc" | 3 |
| "नमस्ते" | 5 |
| "दुनिया" | 5 |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("title").charLength().as("titleCharLength") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("title").charLength().as("titleCharLength") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("title").charLength().alias("titleCharLength") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("title").charLength().alias("titleCharLength") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select(Field.of("title").char_length().as_("titleCharLength")) .execute() )
STARTS_WITH
सिंटैक्स:
starts_with(value: STRING, prefix: STRING) -> BOOLEAN
ब्यौरा:
अगर value, prefix से शुरू होता है, तो TRUE दिखाता है.
उदाहरण:
| value | उपसर्ग | starts_with(value, prefix) |
|---|---|---|
| "abc" | "a" | सही |
| "abc" | "b" | गलत |
| "abc" | "" | सही |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("title").startsWith("The") .as("needsSpecialAlphabeticalSort") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("title").startsWith("The") .as("needsSpecialAlphabeticalSort") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("title").startsWith("The") .alias("needsSpecialAlphabeticalSort") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("title").startsWith("The") .alias("needsSpecialAlphabeticalSort") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select( Field.of("title").starts_with("The").as_("needsSpecialAlphabeticalSort") ) .execute() )
ENDS_WITH
सिंटैक्स:
ends_with(value: STRING, postfix: STRING) -> BOOLEAN
ब्यौरा:
अगर value के आखिर में postfix आता है, तो TRUE दिखाता है.
उदाहरण:
| value | पोस्टफ़िक्स | ends_with(value, postfix) |
|---|---|---|
| "abc" | "c" | सही |
| "abc" | "b" | गलत |
| "abc" | "" | सही |
Swift
let result = try await db.pipeline() .collection("inventory/devices/laptops") .select([ Field("name").endsWith("16 inch") .as("16InLaptops") ]) .execute()
Kotlin
val result = db.pipeline() .collection("inventory/devices/laptops") .select( field("name").endsWith("16 inch") .alias("16InLaptops") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("inventory/devices/laptops") .select( field("name").endsWith("16 inch") .alias("16InLaptops") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("inventory/devices/laptops") .select(Field.of("name").ends_with("16 inch").as_("16InLaptops")) .execute() )
पसंद करें
सिंटैक्स:
like(value: STRING, pattern: STRING) -> BOOLEAN
ब्यौरा:
अगर value का मिलान pattern से होता है, तो TRUE दिखाता है.
उदाहरण:
| value | पैटर्न | like(value, pattern) |
|---|---|---|
| "Firestore" | "Fire%" | सही |
| "Firestore" | "%store" | सही |
| "Datastore" | "Data_tore" | सही |
| "100%" | "100\%" | सही |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("genre").like("%Fiction") .as("anyFiction") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("genre").like("%Fiction") .as("anyFiction") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("genre").like("%Fiction") .alias("anyFiction") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("genre").like("%Fiction") .alias("anyFiction") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select(Field.of("genre").like("%Fiction").as_("anyFiction")) .execute() )
REGEX_CONTAINS
सिंटैक्स:
regex_contains(value: STRING, pattern: STRING) -> BOOLEAN
ब्यौरा:
अगर value का कोई हिस्सा pattern से मैच करता है, तो TRUE दिखाता है. अगर pattern एक मान्य रेगुलर एक्सप्रेशन नहीं है, तो यह फ़ंक्शन error दिखाता है.
रेगुलर एक्सप्रेशन, re2 लाइब्रेरी के सिंटैक्स का पालन करते हैं.
उदाहरण:
| value | पैटर्न | regex_contains(value, pattern) |
|---|---|---|
| "Firestore" | "Fire" | सही |
| "Firestore" | "store$" | सही |
| "Firestore" | "data" | गलत |
Web
const result = await execute(db.pipeline() .collection("documents") .select( field("title").regexContains("Firestore (Enterprise|Standard)") .as("isFirestoreRelated") ) );
Swift
let result = try await db.pipeline() .collection("documents") .select([ Field("title").regexContains("Firestore (Enterprise|Standard)") .as("isFirestoreRelated") ]) .execute()
Kotlin
val result = db.pipeline() .collection("documents") .select( field("title").regexContains("Firestore (Enterprise|Standard)") .alias("isFirestoreRelated") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("documents") .select( field("title").regexContains("Firestore (Enterprise|Standard)") .alias("isFirestoreRelated") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("documents") .select( Field.of("title") .regex_contains("Firestore (Enterprise|Standard)") .as_("isFirestoreRelated") ) .execute() )
REGEX_MATCH
सिंटैक्स:
regex_match(value: STRING, pattern: STRING) -> BOOLEAN
ब्यौरा:
अगर value, pattern से पूरी तरह मैच होता है, तो TRUE दिखाता है. अगर pattern एक मान्य रेगुलर एक्सप्रेशन नहीं है, तो यह फ़ंक्शन error दिखाता है.
रेगुलर एक्सप्रेशन, re2 लाइब्रेरी के सिंटैक्स का पालन करते हैं.
उदाहरण:
| value | पैटर्न | regex_match(value, pattern) |
|---|---|---|
| "Firestore" | "F.*store" | सही |
| "Firestore" | "Fire" | गलत |
| "Firestore" | "^F.*e$" | सही |
Web
const result = await execute(db.pipeline() .collection("documents") .select( field("title").regexMatch("Firestore (Enterprise|Standard)") .as("isFirestoreExactly") ) );
Swift
let result = try await db.pipeline() .collection("documents") .select([ Field("title").regexMatch("Firestore (Enterprise|Standard)") .as("isFirestoreExactly") ]) .execute()
Kotlin
val result = db.pipeline() .collection("documents") .select( field("title").regexMatch("Firestore (Enterprise|Standard)") .alias("isFirestoreExactly") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("documents") .select( field("title").regexMatch("Firestore (Enterprise|Standard)") .alias("isFirestoreExactly") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("documents") .select( Field.of("title") .regex_match("Firestore (Enterprise|Standard)") .as_("isFirestoreExactly") ) .execute() )
STRING_CONCAT
सिंटैक्स:
string_concat(values: STRING...) -> STRING
ब्यौरा:
दो या उससे ज़्यादा STRING वैल्यू को एक साथ जोड़कर एक नतीजा दिखाता है.
उदाहरण:
| आर्ग्युमेंट | string_concat(values...) |
|---|---|
() |
गड़बड़ी |
("a") |
"a" |
("abc", "def") |
"abcdef" |
("a", "", "c") |
"ac" |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("title").stringConcat(" by ", field("author")) .as("fullyQualifiedTitle") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("title").concat([" by ", Field("author")]) .as("fullyQualifiedTitle") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("title").concat(" by ", field("author")) .alias("fullyQualifiedTitle") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("title").concat(" by ", field("author")) .alias("fullyQualifiedTitle") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select( Field.of("title") .concat(" by ", Field.of("author")) .as_("fullyQualifiedTitle") ) .execute() )
STRING_CONTAINS
सिंटैक्स:
string_contains(value: STRING, substring: STRING) -> BOOLEAN
ब्यौरा:
इस फ़ंक्शन से यह पता चलता है कि value में लिटरल स्ट्रिंग substring मौजूद है या नहीं.
उदाहरण:
| value | सबस्ट्रिंग | string_contains(value, substring) |
|---|---|---|
| "abc" | "b" | सही |
| "abc" | "d" | गलत |
| "abc" | "" | सही |
| "a.c" | "." | सही |
| "☃☃☃" | "☃" | सही |
Web
const result = await execute(db.pipeline() .collection("articles") .select( field("body").stringContains("Firestore") .as("isFirestoreRelated") ) );
Swift
let result = try await db.pipeline() .collection("articles") .select([ Field("body").stringContains("Firestore") .as("isFirestoreRelated") ]) .execute()
Kotlin
val result = db.pipeline() .collection("articles") .select( field("body").stringContains("Firestore") .alias("isFirestoreRelated") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("articles") .select( field("body").stringContains("Firestore") .alias("isFirestoreRelated") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("articles") .select(Field.of("body").string_contains("Firestore").as_("isFirestoreRelated")) .execute() )
TO_UPPER
सिंटैक्स:
to_upper[T <: STRING | BYTES](value: T) -> T
ब्यौरा:
यह STRING या BYTES वैल्यू को अपरकेस में बदलता है.
अगर कोई बाइट या वर्ण, UTF-8 लोअरकेस अल्फ़ाबेटिक वर्ण से मेल नहीं खाता है, तो उसे बिना किसी बदलाव के पास कर दिया जाता है.
उदाहरण:
| value | to_upper(value) |
|---|---|
| "abc" | "ABC" |
| "AbC" | "ABC" |
| b"abc" | b"ABC" |
| b"a1c" | b"A1C" |
Web
const result = await execute(db.pipeline() .collection("authors") .select( field("name").toUpper() .as("uppercaseName") ) );
Swift
let result = try await db.pipeline() .collection("authors") .select([ Field("name").toUpper() .as("uppercaseName") ]) .execute()
Kotlin
val result = db.pipeline() .collection("authors") .select( field("name").toUpper() .alias("uppercaseName") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("authors") .select( field("name").toUpper() .alias("uppercaseName") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("authors") .select(Field.of("name").to_upper().as_("uppercaseName")) .execute() )
TO_LOWER
सिंटैक्स:
to_lower[T <: STRING | BYTES](value: T) -> T
ब्यौरा:
STRING या BYTES वैल्यू को अंग्रेज़ी के छोटे अक्षरों में बदलता है.
अगर कोई बाइट या वर्ण, UTF-8 के बड़े अक्षरों वाले वर्ण से मेल नहीं खाता है, तो उसे बिना किसी बदलाव के पास कर दिया जाता है.
उदाहरण:
| value | to_lower(value) |
|---|---|
| "ABC" | "abc" |
| "AbC" | "abc" |
| "A1C" | "a1c" |
| b"ABC" | b"abc" |
Web
const result = await execute(db.pipeline() .collection("authors") .select( field("genre").toLower().equal("fantasy") .as("isFantasy") ) );
Swift
let result = try await db.pipeline() .collection("authors") .select([ Field("genre").toLower().equal("fantasy") .as("isFantasy") ]) .execute()
Kotlin
val result = db.pipeline() .collection("authors") .select( field("genre").toLower().equal("fantasy") .alias("isFantasy") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("authors") .select( field("genre").toLower().equal("fantasy") .alias("isFantasy") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("authors") .select(Field.of("genre").to_lower().equal("fantasy").as_("isFantasy")) .execute() )
SUBSTRING
सिंटैक्स:
substring[T <: STRING | BYTES](input: T, position: INT64) -> T
substring[T <: STRING | BYTES](input: T, position: INT64, length: INT64) -> T
ब्यौरा:
यह फ़ंक्शन, input की एक सबस्ट्रिंग दिखाता है. यह position (शून्य पर आधारित इंडेक्स) से शुरू होती है और इसमें length तक की एंट्री शामिल होती हैं. अगर कोई length नहीं दिया गया है, तो position से लेकर input के आखिर तक की सबस्ट्रिंग दिखाता है.
अगर
input,STRINGवैल्यू है, तोpositionऔरlengthको यूनिकोड कोड पॉइंट में मापा जाता है. अगर यहBYTESवैल्यू है, तो इन्हें बाइट में मेज़र किया जाता है.अगर
position,inputकी लंबाई से ज़्यादा है, तो खाली सबस्ट्रिंग मिलती है. अगरpositionऔरlengthका योग,inputकी लंबाई से ज़्यादा है, तो सबस्ट्रिंग कोinputके आखिर तक काट दिया जाता है.अगर
positionकी वैल्यू नेगेटिव है, तो इनपुट के आखिर से पोज़िशन ली जाती है. अगर नेगेटिवposition, इनपुट के साइज़ से ज़्यादा है, तो पोज़िशन को शून्य पर सेट किया जाता है.lengthकी वैल्यू, ज़ीरो (शून्य) से कम नहीं होनी चाहिए.
उदाहरण:
length की वैल्यू न दिए जाने पर:
| इनपुट | जगह | substring(input, position) |
|---|---|---|
| "abc" | 0 | "abc" |
| "abc" | 1 | "bc" |
| "abc" | 3 | "" |
| "abc" | -1 | "c" |
| b"abc" | 1 | b"bc" |
length कब दिया जाता है:
| इनपुट | जगह | लंबाई | substring(input, position, length) |
|---|---|---|---|
| "abc" | 0 | 1 | "a" |
| "abc" | 1 | 2 | "bc" |
| "abc" | -1 | 1 | "c" |
| b"abc" | 0 | 1 | b"a" |
Web
const result = await execute(db.pipeline() .collection("books") .where(field("title").startsWith("The ")) .select( field("title").substring(4) .as("titleWithoutLeadingThe") ) );
Swift
let result = try await db.pipeline() .collection("books") .where(Field("title").startsWith("The ")) .select([ Field("title").substring(position: 4) .as("titleWithoutLeadingThe") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .where(field("title").startsWith("The ")) .select( field("title") .substring(constant(4), field("title").charLength().subtract(4)) .alias("titleWithoutLeadingThe") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .where(field("title").startsWith("The ")) .select( field("title").substring( constant(4), field("title").charLength().subtract(4)) .alias("titleWithoutLeadingThe") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .where(Field.of("title").starts_with("The ")) .select(Field.of("title").substring(4).as_("titleWithoutLeadingThe")) .execute() )
STRING_REVERSE
सिंटैक्स:
string_reverse[T <: STRING | BYTES](input: T) -> T
ब्यौरा:
यह फ़ंक्शन, दिए गए इनपुट को उल्टे क्रम में दिखाता है.
जब इनपुट STRING होता है, तब वर्णों को यूनिकोड कोड पॉइंट से अलग किया जाता है. वहीं, जब इनपुट BYTES वैल्यू होती है, तब वर्णों को बाइट से अलग किया जाता है.
उदाहरण:
| इनपुट | string_reverse(input) |
|---|---|
| "abc" | "cba" |
| "a🌹b" | "b🌹a" |
| "नमस्ते" | "olleh" |
| b"abc" | b"cba" |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("name").reverse().as("reversedName") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("name").reverse().as("reversedName") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("name").reverse().alias("reversedName") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("name").reverse().alias("reversedName") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select(Field.of("name").string_reverse().as_("reversedName")) .execute() )
TRIM
सिंटैक्स:
trim[T <: STRING | BYTES](input: T, values_to_trim: T) -> T
trim[T <: STRING | BYTES](input: T) -> T
ब्यौरा:
यह फ़ंक्शन, दी गई input के शुरू और आखिर से, तय किए गए BYTES या CHARS को हटाता है.
- अगर कोई
values_to_trimनहीं दिया गया है, तो व्हाइटस्पेस वर्णों को ट्रिम करता है.
उदाहरण:
values_to_trim की वैल्यू न दिए जाने पर:
| इनपुट | trim(input) |
|---|---|
| " foo " | "foo" |
| b" foo " | b"foo" |
| "foo" | "foo" |
| "" | "" |
| " " | "" |
| "\t foo \n" | "foo" |
| b"\t foo \n" | b"foo" |
| "\r\f\v foo \r\f\v" | "foo" |
| b"\r\f\v foo \r\f\v" | b"foo" |
values_to_trim कब दिया जाता है:
| इनपुट | values_to_trim | trim(input, values_to_trim) |
|---|---|---|
| "abcbfooaacb" | "abc" | "foo" |
| "abcdaabadbac" | "abc" | "daabad" |
| b"C1C2C3" | b"C1" | b"C2C3" |
| b"C1C2" | "foo" | गड़बड़ी |
| "foo" | b"C1" | गड़बड़ी |
Web
const result = await execute(db.pipeline() .collection("books") .select( field("name").trim().as("whitespaceTrimmedName") ) );
Swift
let result = try await db.pipeline() .collection("books") .select([ Field("name").trim(" \n\t").as("whitespaceTrimmedName") ]) .execute()
Kotlin
val result = db.pipeline() .collection("books") .select( field("name").trim().alias("whitespaceTrimmedName") ) .execute()
Java
Task<Pipeline.Snapshot> result = db.pipeline() .collection("books") .select( field("name").trim().alias("whitespaceTrimmedName") ) .execute();
Python
from google.cloud.firestore_v1.pipeline_expressions import Field result = ( client.pipeline() .collection("books") .select(Field.of("name").trim().as_("whitespaceTrimmedName")) .execute() )
SPLIT
सिंटैक्स:
split(input: STRING) -> ARRAY<STRING>
split[T <: STRING | BYTES](input: T, delimiter: T) -> ARRAY<T>
ब्यौरा:
यह फ़ंक्शन, डीलिमिटर का इस्तेमाल करके STRING या BYTES वैल्यू को अलग-अलग हिस्सों में बांटता है.
STRINGके लिए डिफ़ॉल्ट डीलिमिटर, कॉमा,होता है. डेलिमिटर को एक स्ट्रिंग के तौर पर माना जाता है.BYTESके लिए, आपको डेलिमिटर तय करना होगा.खाली डेलिमीटर के आधार पर स्प्लिट करने पर,
STRINGवैल्यू के लिए यूनिकोड कोडपॉइंट की एक श्रेणी औरBYTESवैल्यू के लिएBYTESकी एक श्रेणी मिलती है.खाली
STRINGको स्प्लिट करने पर, एक खालीSTRINGवालाARRAYमिलता है.
उदाहरण:
delimiter की वैल्यू न दिए जाने पर:
| इनपुट | split(input) |
|---|---|
| "foo,bar,foo" | ["foo", "bar", "foo"] |
| "foo" | ["foo"] |
| ",foo," | ["", "foo", ""] |
| "" | [""] |
| b"C120C2C4" | गड़बड़ी |
delimiter कब दिया जाता है:
| इनपुट | डेलिमिटर | split(input, delimiter) |
|---|---|---|
| "foo bar foo" | " " | ["foo", "bar", "foo"] |
| "foo bar foo" | "z" | ["foo bar foo"] |
| "abc" | "" | ["a", "b", "c"] |
| b"C1,C2,C4" | b"," | [b"C1", b"C2", b"C4"] |
| b"ABC" | b"" | [b"A", b"B", b"C"] |
| "foo" | b"C1" | गड़बड़ी |