summaryrefslogtreecommitdiff
path: root/absl/strings
Commit message (Collapse)AuthorAge
* Merge pull request #1416 from AtariDreams:fillGravatar Copybara-Service2023-04-24
|\ | | | | | | | | PiperOrigin-RevId: 526675031 Change-Id: Ib84423ccea2d0183166194a0916a97a7ed32915c
| * Prefer copy_n and fill_n over copy and fill where appropriate.Gravatar Rose2023-04-19
|/ | | | This lets us avoid having to do the addition manually.
* Clarify code comment to avoid confusion.Gravatar Abseil Team2023-03-30
| | | | | PiperOrigin-RevId: 520724148 Change-Id: Ia90c4a711649e89454bc2ca0a9d0d771d56e79c0
* Be more consistent in the documentation and variable declarations for base64 ↵Gravatar Abseil Team2023-03-16
| | | | | | | | | | | escaping vs unescaping: * Move table documenting escaping conversions to be next to the internal escaping code that implements it. Mention it from the internal _un_escaping code (which reverses it) too. * Centralize the two arrays which map from normal chars to escaped chars (k(WebSafe)Base64Chars), and make bidirectional documentation links between them and their reverse (unescaping) maps (kUn(WebSafe)Base64). * Remove redundant list of escaping/unescaping methods in the public escaping.cc. PiperOrigin-RevId: 517142667 Change-Id: I627e59a196ef855e5bf61ef7f4b509920e8d7acd
* Add StrContainsIgnoreCase() to strings/match.h; all the other case-sensitive ↵Gravatar Greg Falcon2023-03-15
| | | | | | | methods in this file have corresponding case-insensitive ones. PiperOrigin-RevId: 516933773 Change-Id: Iaec41afd923b10bc493ad864c0ecfe85a1fe2db8
* Performance improvement for absl::AsciiStrToUpper() and absl::AsciiStrToLower()Gravatar Abseil Team2023-03-13
| | | | | PiperOrigin-RevId: 516275043 Change-Id: I906ef0d96dddf12e3738490bd26cb05753ec008c
* Improve readability of ::testing::ElementsAre and ::testing::Le in unit ↵Gravatar Abseil Team2023-03-09
| | | | | | | tests assertions. PiperOrigin-RevId: 515396682 Change-Id: I1b07d94611323569b199e1f4d03c7c49147c6bfb
* Use const and static for member functionsGravatar Rose2023-03-07
| | | | This shows that these are member functions that do not modify a class's data.
* Internal Code ChangeGravatar Abseil Team2023-03-06
| | | | | PiperOrigin-RevId: 514567673 Change-Id: I02721d424f01965a7a5e08c06487af358c853627
* Add CalculateBase64EscapeLen variations for the 3 base64 escaping methods ↵Gravatar Abseil Team2023-02-22
| | | | | | | | | (Base64Escape, WebSafeBase64Escape, WebSafeBase64EscapeWithPadding). Also update CalculateBase64EscapedLen() documentation (it references outdated Base64Escape API), and reference it from WebSafeBase64Escape (to match Base64Escape). PiperOrigin-RevId: 511647760 Change-Id: I7dee18645c2a779c0762bc71da75a4684ec2493f
* Merge pull request #1403 from AtariDreams:c++11Gravatar Copybara-Service2023-02-22
|\ | | | | | | | | PiperOrigin-RevId: 511539869 Change-Id: I32d5e91537b078691988e7e6d3244c682eb8d7d2
| * Resolve TODO: remove C++11 workaroundsGravatar Rose2023-02-22
|/ | | | We no longer support C++11 as per the Google C++ support documentation: we support C++14 and up, so we can remove these workarounds.
* Remove Workarounds for Old Clang BugGravatar Rose2023-02-14
| | | | | | https://bugs.llvm.org/show_bug.cgi?id=38289 has been addressed since 2019. We just have to check to see if the clang being used to compile with is any version before major version 9.
* Fix missing includes/dependenciesGravatar Derek Mauro2023-02-02
| | | | | PiperOrigin-RevId: 506622658 Change-Id: I17ae2d97a6cadb7bdd8ebd0ec0dd3976568cb7e1
* Adds `AbslStringify` support to `absl::Hex` and `absl::Dec`Gravatar Phoebe Liang2023-01-27
| | | | | | | | | | | | | `absl::Hex` and `absl::Dec` are now stringifiable through `AbslStringify`. This means that they can be passed to logging, `absl::StrFormat`, `absl::StrCat` and `absl::Substitute`. Note that this change will break unsupported usages of `absl::AlphaNum`. `absl::AlphaNum` is not intended to be instantiated as a stack variable due to lifetime issues. Unsupported usages include: * constructing an `absl::AlphaNum` as a local variable. * For example, `absl::AlphaNum a = absl::Hex(...);` * declaring an `absl::AlphaNum` as a member variable Usage of `absl::AlphaNum` as a function parameter will continue to be supported. PiperOrigin-RevId: 505158534 Change-Id: Idecdf0b3d137482e86b393c7480229343d68eb36
* Add lifetime annotations to AlphaNum.Gravatar Abseil Team2023-01-26
| | | | | PiperOrigin-RevId: 504866618 Change-Id: I9519299946c693ae1bedd769a25a9cb5137f2f54
* Cord does not need its str_format dependencyGravatar Derek Mauro2023-01-26
| | | | | | | Fixes #1360 PiperOrigin-RevId: 504850733 Change-Id: Ifa1e83d0c703ed69c969a12076db474caec9d496
* Make `SanitizerSafeCopy()` constexpr, and check for constant evaluationGravatar Martijn Vels2023-01-25
| | | | | PiperOrigin-RevId: 504728034 Change-Id: Ifb338247b7484426e25a58580783a1d70d27e6fd
* Add memory sanitizer to absl::CordGravatar Martijn Vels2023-01-25
| | | | | PiperOrigin-RevId: 504555535 Change-Id: Id40484e9f52c87e9d67def2735ee60481ca50526
* Add missing include and remove unused includesGravatar Derek Mauro2023-01-19
| | | | | PiperOrigin-RevId: 503229681 Change-Id: I72817b43c547bd142144d0887866c4e26ec09fb2
* Doc fix: state that Base64Escape does in fact produce padding. While at it, ↵Gravatar Abseil Team2023-01-19
| | | | | | | harmonize Base64Unescape and WebSafeBase64Unescape's documentation of padding. PiperOrigin-RevId: 503178146 Change-Id: Id216044a9f6520653e2fa3a4505ff05eddf55659
* Only enable cordz on Linux with thread_local supportGravatar Derek Mauro2023-01-19
| | | | | | | Fixes #1365 PiperOrigin-RevId: 503160321 Change-Id: I210f194373c3e08a75d68298a8482be5f1f2227c
* Use absl::string_view by value rather than by const reference while ↵Gravatar Abseil Team2023-01-19
| | | | | | | iterating over collections. PiperOrigin-RevId: 503088193 Change-Id: Ic1f239f3b0427e0fea1643ec0ce7baff45ad647d
* Clarify contract of AlphaNum as only a function parameter typeGravatar Tom Manshreck2023-01-18
| | | | | PiperOrigin-RevId: 502901875 Change-Id: I1c8c097e5c81a9e413692109ebfe0d0b24f50f2e
* Replace the tag "no_test_msvc_x64" with "no_test_lexan" in absl.Gravatar Abseil Team2023-01-12
| | | | | PiperOrigin-RevId: 501644407 Change-Id: Ie98d22e4983cfbd9cad2176925774d624d4702cf
* Refactor InlineData to allow for memory sanitizer changes step 2Gravatar Martijn Vels2023-01-10
| | | | | PiperOrigin-RevId: 501074382 Change-Id: I26a59ee6452855685ffe89469c352e6384060f59
* Replace generic 'base64 encoding' terminology with the specific RFCs they match.Gravatar Abseil Team2023-01-09
| | | | | | | | | Remove duplicate documentation for two variants of Base64EscapeInternal(). Clarify role of base64 char array input (controls web-safe or not). PiperOrigin-RevId: 500867221 Change-Id: Ie316a7ddd60794e041c5b9b39e9ab5b66ed565a6
* Clarify that Base64 unescaping methods expect their inputs to match ↵Gravatar Abseil Team2023-01-09
| | | | | | | particular RFC specifications. PiperOrigin-RevId: 500809781 Change-Id: I34d089343321f7658db8252ad29ff1824e6dbef2
* Refactor InlineData to allow for memory sanitizer changes step 1Gravatar Martijn Vels2023-01-09
| | | | | PiperOrigin-RevId: 500765473 Change-Id: Iaa3f9fdee6c9f4322bc8995b0d381cf1c8cb1349
* Use "#if GTEST_HAS_DEATH_TEST" instead of "#ifdef GTEST_HAS_DEATH_TEST"Gravatar Tom Hughes2023-01-09
| | | | | | | | This is consistent with the rest of the GTEST_HAS_DEATH usages in the code and the example in gtest-port.h. PiperOrigin-RevId: 500740093 Change-Id: I2acc158116b0e8bccc8ab45d75c8059828a4c251
* Move description of escaping to code that does the escaping rather than the ↵Gravatar Abseil Team2023-01-05
| | | | | | | | | CalculateBase64EscapedLenInternal helper method. Note that output padding is conditional on do_padding. PiperOrigin-RevId: 499901986 Change-Id: I8c1d28fe372b3e0e2216654db83f949caa297892
* Replace ABSL_INTERNAL_UNREACHABLE with ABSL_UNREACHABLE()Gravatar Derek Mauro2022-12-22
| | | | | PiperOrigin-RevId: 497197704 Change-Id: I3865a874e04f6f55a1ab374b03451535a86bc5a3
* Remove obsolete RFC 3548 from escaping.cc's Base64UnescapeInternal. (Note ↵Gravatar Abseil Team2022-12-12
| | | | | | | that the proper non-obsolete RFC 4648 is already listed in escaping.h's Base64Escape() documentation) PiperOrigin-RevId: 494821805 Change-Id: Id3bffcb968a7c865c9a6bcbf241870c3674601ba
* Allow Cord to store chunked checksumsGravatar Derek Mauro2022-12-11
| | | | | PiperOrigin-RevId: 494587777 Change-Id: I41504edca6fcf750d52602fa84a33bc7fe5fbb48
* Fixes issue where AbslStringify() breaks formatting with %d for enumsGravatar Phoebe Liang2022-12-07
| | | | | PiperOrigin-RevId: 493682437 Change-Id: I30f2ac36b998b86c24fe7513cd952b860560a66e
* Remove possible UB from CopyRaw()Gravatar Martijn Vels2022-12-07
| | | | | | | This change removes the 'create by single memcpy' CopyRaw() logic to avoid potential UB from the atomic refcount data being included in the memcpy. While we know this works on all supported platforms, it is officially UB, and we should change it to something else. This change changes the CopyRaw() method to explicitly create a (default initialized) instance, initialize `length` and `refcount`, and then memcpy the remaining contents which are trivial uint8_t and CordRep* values. PiperOrigin-RevId: 493596072 Change-Id: I46618883eb1c7c9ed9eb083f4d3e7fc501f23df5
* Add AbslStringify support for enum types in Substitute.Gravatar Abseil Team2022-12-02
| | | | | PiperOrigin-RevId: 492481345 Change-Id: Ie77656ed334b54930ee852d31e2794a1fc58ce2f
* Use a c++14-style constexpr initialization if c++14 constexpr is available.Gravatar Jorg Brown2022-12-02
| | | | | PiperOrigin-RevId: 492463896 Change-Id: I063759ca5ceb3597a7c8ab25af23aa688dee26c2
* Reorder base64 unescape methods to be below the escaping methods.Gravatar Abseil Team2022-11-30
| | | | | PiperOrigin-RevId: 491992941 Change-Id: Id66154cc4561770047b55625ef00014602975c5d
* Convert the full parser into constexpr now that Abseil requires C++14, and useGravatar Samuel Benzaquen2022-11-29
| | | | | | | | | | | | | this parser for the static checker. This fixes some outstanding bugs where the static checker differed from the dynamic one. Also, fix `%v` to be accepted with POSIX syntax. Tested: Presubmit TGP OCL:487237262:BASE:490275393:1669141454896:92dd62e3 PiperOrigin-RevId: 491650577 Change-Id: Id138c108187428b3aea46f8887495f1da12c91b2
* Removing trailing period that can confuse a url in str_format.h.Gravatar Abseil Team2022-11-22
| | | | | PiperOrigin-RevId: 490329293 Change-Id: Ied36e737e85afc683cc7cc116ac6bc07092472df
* Document the WebSafe* and *WithPadding variants more concisely, as deltas ↵Gravatar Abseil Team2022-11-21
| | | | | | | | | | | from Base64Encode. Also: * Clarify that padding refers to ‘output’ padding * Make CalculateBase64EscapedLen() a bit more discoverable * Reference all relevant non-obsolete RFCs (2045 as well as 4648) PiperOrigin-RevId: 489981278 Change-Id: I27365ea5d52bfdb0c9d02ed96d05b4a60f2dc36f
* Updated documentation on use of %vGravatar Tom Manshreck2022-11-15
| | | | | | | Also updated documentation around FormatSink and PutPaddedString PiperOrigin-RevId: 488651398 Change-Id: Ic6c586dbb8bea61df841a142f12d22c7e5b03f43
* Add support for enum types with AbslStringifyGravatar Abseil Team2022-11-09
| | | | | PiperOrigin-RevId: 487394692 Change-Id: I55e9b57055483dc921e9773c3643ea9be4f9bdf6
* Support logging of user-defined types that implement `AbslStringify()`Gravatar Phoebe Liang2022-11-02
| | | | | | | | | If a user-defined type has `AbslStringify()` defined, it will always be used for logging over `operator<<`. `HasAbslStringify` now uses the empty class `UnimplementedSink` for its checks instead of `StringifySink` in order to make it work in cases involving other sinks. PiperOrigin-RevId: 485710377 Change-Id: Ibdd916151c7abc3269c35fbe79b772867f3d25e1
* Fix -Wimplicit-int-conversion.Gravatar Abseil Team2022-11-02
| | | | | PiperOrigin-RevId: 485575914 Change-Id: If1752252e3cc2f91dc3c171382c9fb3a4def0377
* Cord: Avoid leaking a node if SetExpectedChecksum() is called on anGravatar Derek Mauro2022-11-01
| | | | | | | empty cord twice in a row. PiperOrigin-RevId: 485367641 Change-Id: I6605ff25acbcef7c40b68e15a8888076a2da63be
* Support empty Cords with an expected checksumGravatar Derek Mauro2022-10-28
| | | | | PiperOrigin-RevId: 484578104 Change-Id: Ie4be3e4de27dc28d88395e16fd075fb10ab7a302
* Move internal details from one source file to another more appropriate sourceGravatar Andy Soffer2022-10-27
| | | | | | | file. PiperOrigin-RevId: 484419458 Change-Id: Ic2c1afa1a3434ac071c01ae2e6c75dee41b1f069
* Removes `PutPaddedString()` functionGravatar Phoebe Liang2022-10-27
| | | | | | | This function is unnecessary as it was originally used to support modifiers with `absl::StrFormat()`. This functionality is irrelevant to `absl::StrCat()`. PiperOrigin-RevId: 484339246 Change-Id: I8c4a0ee01b30aee7a83f6ab54e5465465cc9cc56