mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add ignoring _definst_ at the end of app (#1261)
This commit is contained in:
parent
b2066cbf68
commit
e62ac29f48
5 changed files with 55 additions and 0 deletions
|
@ -1514,6 +1514,18 @@ VOID TEST(KernelUtilityTest, UtilityString)
|
|||
|
||||
str1 = srs_string_remove(str, "ol");
|
||||
EXPECT_STREQ("He, Wrd! He, SRS!", str1.c_str());
|
||||
|
||||
str1 = srs_erase_first_substr(str, "Hello");
|
||||
EXPECT_STREQ(", World! Hello, SRS!", str1.c_str());
|
||||
|
||||
str1 = srs_erase_first_substr(str, "XX");
|
||||
EXPECT_STREQ("Hello, World! Hello, SRS!", str1.c_str());
|
||||
|
||||
str1 = srs_erase_last_substr(str, "Hello");
|
||||
EXPECT_STREQ("Hello, World! , SRS!", str1.c_str());
|
||||
|
||||
str1 = srs_erase_last_substr(str, "XX");
|
||||
EXPECT_STREQ("Hello, World! Hello, SRS!", str1.c_str());
|
||||
|
||||
EXPECT_FALSE(srs_string_ends_with("Hello", "x"));
|
||||
EXPECT_TRUE(srs_string_ends_with("Hello", "o"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue