File: string_view.qbk

package info (click to toggle)
boost1.90 1.90.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 593,120 kB
  • sloc: cpp: 4,190,908; xml: 196,648; python: 34,618; ansic: 23,145; asm: 5,468; sh: 3,774; makefile: 1,161; perl: 1,020; sql: 728; ruby: 676; yacc: 478; java: 77; lisp: 24; csh: 6
file content (768 lines) | stat: -rw-r--r-- 21,584 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
[/
  Copyright 2021 Peter Dimov
  Distributed under the Boost Software License, Version 1.0.
  https://boost.org/LICENSE_1_0.txt
]

[section:string_view string_view]

[simplesect Authors]

* Peter Dimov

[endsimplesect]

[section Header <boost/core/string_view.hpp>]

The header `<boost/core/string_view.hpp>` defines `boost::core::string_view`,
a portable and interoperable implementation of `std::string_view`.

Unlike `boost::string_view`, `boost::core::string_view` has implicit
conversions from and to `std::string_view`, which allows Boost libraries that
support C++11/C++14 to use it in interfaces without forcing users to forgo the
use of `std::string_view` in their code.

[section Synopsis]

``
namespace boost
{
namespace core
{

template<class Ch> class basic_string_view
{
public:

    // types

    typedef std::char_traits<Ch> traits_type;
    typedef Ch value_type;
    typedef Ch* pointer;
    typedef Ch const* const_pointer;
    typedef Ch& reference;
    typedef Ch const& const_reference;
    typedef Ch const* const_iterator;
    typedef const_iterator iterator;
    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
    typedef const_reverse_iterator reverse_iterator;
    typedef std::size_t size_type;
    typedef std::ptrdiff_t difference_type;

    // npos

    static constexpr size_type npos = static_cast<size_type>( -1 );

public:

    // construction and assignment

    constexpr basic_string_view() noexcept;
    constexpr basic_string_view( basic_string_view const& ) noexcept = default;
    constexpr basic_string_view& operator=( basic_string_view const& ) noexcept & = default;
    constexpr basic_string_view( Ch const* str ) noexcept;
    constexpr basic_string_view( Ch const* str, size_type len ) noexcept;
    constexpr basic_string_view( Ch const* begin, Ch const* end ) noexcept;
    template<class A> basic_string_view( std::basic_string<Ch, std::char_traits<Ch>, A> const& str ) noexcept;
    basic_string_view( std::basic_string_view<Ch, std::char_traits<Ch>> const& str ) noexcept;

    // conversions

    template<class A> operator std::basic_string<Ch, std::char_traits<Ch>, A>() const;
    template<class Ch2> operator std::basic_string_view<Ch2>() const noexcept;

    // iterator support

    constexpr const_iterator begin() const noexcept;
    constexpr const_iterator end() const noexcept;
    constexpr const_iterator cbegin() const noexcept;
    constexpr const_iterator cend() const noexcept;
    constexpr const_reverse_iterator rbegin() const noexcept;
    constexpr const_reverse_iterator rend() const noexcept;
    constexpr const_reverse_iterator crbegin() const noexcept;
    constexpr const_reverse_iterator crend() const noexcept;

    // capacity

    constexpr size_type size() const noexcept;
    constexpr size_type length() const noexcept;
    constexpr size_type max_size() const noexcept;
    constexpr bool empty() const noexcept;

    // element access

    constexpr const_reference operator[]( size_type pos ) const noexcept;
    constexpr const_reference at( size_type pos ) const;
    constexpr const_reference front() const noexcept;
    constexpr const_reference back() const noexcept;
    constexpr const_pointer data() const noexcept;

    // modifiers

    constexpr void remove_prefix( size_type n ) noexcept;
    constexpr void remove_suffix( size_type n ) noexcept;
    constexpr void swap( basic_string_view& s ) noexcept;

    // string operations

    constexpr size_type copy( Ch* s, size_type n, size_type pos = 0 ) const;
    constexpr basic_string_view substr( size_type pos = 0, size_type n = npos ) const;

    // compare

    constexpr int compare( basic_string_view str ) const noexcept;
    constexpr int compare( size_type pos1, size_type n1, basic_string_view str ) const;
    constexpr int compare( size_type pos1, size_type n1, basic_string_view str, size_type pos2, size_type n2 ) const;
    constexpr int compare( Ch const* s ) const;
    constexpr int compare( size_type pos1, size_type n1, Ch const* s ) const;
    constexpr int compare( size_type pos1, size_type n1, Ch const* s, size_type n2 ) const;

    // starts_with

    constexpr bool starts_with( basic_string_view x ) const noexcept;
    constexpr bool starts_with( Ch x ) const noexcept;
    constexpr bool starts_with( Ch const* x ) const noexcept;

    // ends_with

    constexpr bool ends_with( basic_string_view x ) const noexcept;
    constexpr bool ends_with( Ch x ) const noexcept;
    constexpr bool ends_with( Ch const* x ) const noexcept;

    // find

    constexpr size_type find( basic_string_view str, size_type pos = 0 ) const noexcept;
    constexpr size_type find( Ch c, size_type pos = 0 ) const noexcept;
    constexpr size_type find( Ch const* s, size_type pos, size_type n ) const noexcept;
    constexpr size_type find( Ch const* s, size_type pos = 0 ) const noexcept;

    // rfind

    constexpr size_type rfind( basic_string_view str, size_type pos = npos ) const noexcept;
    constexpr size_type rfind( Ch c, size_type pos = npos ) const noexcept;
    constexpr size_type rfind( Ch const* s, size_type pos, size_type n ) const noexcept;
    constexpr size_type rfind( Ch const* s, size_type pos = npos ) const noexcept;

    // find_first_of

    constexpr size_type find_first_of( basic_string_view str, size_type pos = 0 ) const noexcept;
    constexpr size_type find_first_of( Ch c, size_type pos = 0 ) const noexcept;
    constexpr size_type find_first_of( Ch const* s, size_type pos, size_type n ) const noexcept;
    constexpr size_type find_first_of( Ch const* s, size_type pos = 0 ) const noexcept;

    // find_last_of

    constexpr size_type find_last_of( basic_string_view str, size_type pos = npos ) const noexcept;
    constexpr size_type find_last_of( Ch c, size_type pos = npos ) const noexcept;
    constexpr size_type find_last_of( Ch const* s, size_type pos, size_type n ) const noexcept;
    constexpr size_type find_last_of( Ch const* s, size_type pos = npos ) const noexcept;

    // find_first_not_of

    constexpr size_type find_first_not_of( basic_string_view str, size_type pos = 0 ) const noexcept;
    constexpr size_type find_first_not_of( Ch c, size_type pos = 0 ) const noexcept;
    constexpr size_type find_first_not_of( Ch const* s, size_type pos, size_type n ) const noexcept;
    constexpr size_type find_first_not_of( Ch const* s, size_type pos = 0 ) const noexcept;

    // find_last_not_of

    constexpr size_type find_last_not_of( basic_string_view str, size_type pos = npos ) const noexcept;
    constexpr size_type find_last_not_of( Ch c, size_type pos = npos ) const noexcept;
    constexpr size_type find_last_not_of( Ch const* s, size_type pos, size_type n ) const noexcept;
    constexpr size_type find_last_not_of( Ch const* s, size_type pos = npos ) const noexcept;

    // contains

    constexpr bool contains( basic_string_view sv ) const noexcept;
    constexpr bool contains( Ch c ) const noexcept;
    constexpr bool contains( Ch const* s ) const noexcept;

    // relational operators

    constexpr friend bool operator==( basic_string_view sv1, basic_string_view sv2 ) noexcept;
    constexpr friend bool operator!=( basic_string_view sv1, basic_string_view sv2 ) noexcept;
    constexpr friend bool operator<( basic_string_view sv1, basic_string_view sv2 ) noexcept;
    constexpr friend bool operator<=( basic_string_view sv1, basic_string_view sv2 ) noexcept;
    constexpr friend bool operator>( basic_string_view sv1, basic_string_view sv2 ) noexcept;
    constexpr friend bool operator>=( basic_string_view sv1, basic_string_view sv2 ) noexcept;
};

// stream inserter

template<class Ch> std::basic_ostream<Ch>& operator<<( std::basic_ostream<Ch>& os, basic_string_view<Ch> str );

// typedef names

typedef basic_string_view<char> string_view;
typedef basic_string_view<wchar_t> wstring_view;
typedef basic_string_view<char16_t> u16string_view;
typedef basic_string_view<char32_t> u32string_view;
typedef basic_string_view<char8_t> u8string_view;

} // namespace core
} // namespace boost
``

[endsect]

[section Construction]

[section `constexpr basic_string_view() noexcept;`]

* *Ensures:* `data() == 0`; `size() == 0`.

[endsect]

[section `constexpr basic_string_view( Ch const* str ) noexcept;`]

* *Ensures:* `data() == str`; `size() == traits_type::length( str )`.

[endsect]

[section `constexpr basic_string_view( Ch const* str, size_type len ) noexcept;`]

* *Ensures:* `data() == str`; `size() == len`.

[endsect]

[section `constexpr basic_string_view( Ch const* begin, Ch const* end ) noexcept;`]

* *Requires:* `end >= begin`.
* *Ensures:* `data() == begin`; `size() == end - begin`.

[endsect]

[section `template<class A> basic_string_view( std::basic_string<Ch, std::char_traits<Ch>, A> const& str ) noexcept;`]

* *Ensures:* `data() == str.data()`; `size() == str.size()`.

[endsect]

[section `basic_string_view( std::basic_string_view<Ch, std::char_traits<Ch>> const& str ) noexcept;`]

* *Ensures:* `data() == str.data()`; `size() == str.size()`.

[endsect]

[endsect]

[section Conversions]

[section `template<class A> operator std::basic_string<Ch, std::char_traits<Ch>, A>() const;`]

* *Returns:* `std::basic_string<Ch, std::char_traits<Ch>, A>( data(), size() )`.

[endsect]

[section `template<class Ch2> operator std::basic_string_view<Ch2>() const noexcept;`]

* *Constraints:* `Ch2` is the same type as `Ch`.
* *Returns:* `std::basic_string_view<Ch2>( data(), size() )`.

[endsect]

[endsect]

[section Iterator Support]

[section `constexpr const_iterator begin() const noexcept;`]

* *Returns:* `data()`.

[endsect]

[section `constexpr const_iterator end() const noexcept;`]

* *Returns:* `data() + size()`.

[endsect]

[section `constexpr const_iterator cbegin() const noexcept;`]

* *Returns:* `begin()`.

[endsect]

[section `constexpr const_iterator cend() const noexcept;`]

* *Returns:* `end()`.

[endsect]

[section `constexpr const_reverse_iterator rbegin() const noexcept;`]

* *Returns:* `const_reverse_iterator( end() )`.

[endsect]

[section `constexpr const_reverse_iterator rend() const noexcept;`]

* *Returns:* `const_reverse_iterator( begin() )`.

[endsect]

[section `constexpr const_reverse_iterator crbegin() const noexcept;`]

* *Returns:* `rbegin()`.

[endsect]

[section `constexpr const_reverse_iterator crend() const noexcept;`]

* *Returns:* `rend()`.

[endsect]

[endsect]

[section Capacity]

[section `constexpr size_type size() const noexcept;`]

* *Returns:* the length of the referenced character sequence.

[endsect]

[section `constexpr size_type length() const noexcept;`]

* *Returns:* `size()`.

[endsect]

[section `constexpr size_type max_size() const noexcept;`]

* *Returns:* `std::numeric_limits<size_type>::max() / sizeof(Ch)`.

[endsect]

[section `constexpr bool empty() const noexcept;`]

* *Returns:* `size() == 0`.

[endsect]

[endsect]

[section Element Access]

[section `constexpr const_reference operator[]( size_type pos ) const noexcept;`]

* *Requires:* `pos < size()`.
* *Returns:* `data()[ pos ]`.

[endsect]

[section `constexpr const_reference at( size_type pos ) const;`]

* *Returns:* `data()[ pos ]`.
* *Throws:* `std::out_of_range` when `pos >= size()`.

[endsect]

[section `constexpr const_reference front() const noexcept;`]

* *Requires:* `!empty()`.
* *Returns:* `data()[ 0 ]`.

[endsect]

[section `constexpr const_reference back() const noexcept;`]

* *Requires:* `!empty()`.
* *Returns:* `data()[ size() - 1 ]`.

[endsect]

[section `constexpr const_pointer data() const noexcept;`]

* *Returns:* a pointer to the beginning of the referenced character sequence.

[endsect]

[endsect]

[section Modifiers]

[section `constexpr void remove_prefix( size_type n ) noexcept;`]

* *Requires:* `n <= size()`.
* *Effects:* advances `data()` by `n` and decreases `size()` by `n`.

[endsect]

[section `constexpr void remove_suffix( size_type n ) noexcept;`]

* *Requires:* `n <= size()`.
* *Effects:* decreases `size()` by `n`.

[endsect]

[section `constexpr void swap( basic_string_view& s ) noexcept;`]

* *Effects:* exchanges the contents of `*this` and `s`.

[endsect]

[endsect]

[section String Operations]

[section copy]

[section `constexpr size_type copy( Ch* s, size_type n, size_type pos = 0 ) const;`]

* *Effects:* copies to `s` the contents of `substr( pos, n )`.
* *Throws:* `std::out_of_range` when `pos >= size()`.

[endsect]

[endsect]

[section substr]

[section `constexpr basic_string_view substr( size_type pos = 0, size_type n = npos ) const;`]

* *Returns:* `basic_string_view( data() + pos, std::min( size() - pos, n ) )`.
* *Throws:* `std::out_of_range` when `pos >= size()`.

[endsect]

[endsect]

[section compare]

[section `constexpr int compare( basic_string_view str ) const noexcept;`]

* *Returns:*
  * if `traits_type::compare( data(), str.data(), std::min( size(), str.size() ) )` is not zero, returns it. Otherwise,
  * if `size() < str.size()`, returns a negative number. Otherwise,
  * if `size() > str.size()`, returns a positive number. Otherwise,
  * returns 0.

[endsect]

[section `constexpr int compare( size_type pos1, size_type n1, basic_string_view str ) const;`]

* *Returns:* `substr( pos1, n1 ).compare( str )`.

[endsect]

[section `constexpr int compare( size_type pos1, size_type n1, basic_string_view str, size_type pos2, size_type n2 ) const;`]

* *Returns:* `substr( pos1, n1 ).compare( str.substr( pos2, n2 ) )`.

[endsect]

[section `constexpr int compare( Ch const* s ) const noexcept;`]

* *Returns:* `compare( basic_string_view( s ) )`.

[endsect]

[section `constexpr int compare( size_type pos1, size_type n1, Ch const* s ) const;`]

* *Returns:* `substr( pos1, n1 ).compare( basic_string_view( s ) )`.

[endsect]

[section `constexpr int compare( size_type pos1, size_type n1, Ch const* s, size_type n2 ) const;`]

* *Returns:* `substr( pos1, n1 ).compare( basic_string_view( s, n2 ) )`.

[endsect]

[endsect]

[section starts_with]

[section `constexpr bool starts_with( basic_string_view x ) const noexcept;`]

* *Returns:* `substr( 0, x.size() ) == x`.

[endsect]

[section `constexpr bool starts_with( Ch x ) const noexcept;`]

* *Returns:* `starts_with( basic_string_view( &x, 1 ) )`.

[endsect]

[section `constexpr bool starts_with( Ch const* x ) const noexcept;`]

* *Returns:* `starts_with( basic_string_view( x ) )`.

[endsect]

[endsect]

[section ends_with]

[section `constexpr bool ends_with( basic_string_view x ) const noexcept;`]

* *Returns:* `size() >= x.size() && substr( size() - x.size(), x.size() ) == x`.

[endsect]

[section `constexpr bool ends_with( Ch x ) const noexcept;`]

* *Returns:* `ends_with( basic_string_view( &x, 1 ) )`.

[endsect]

[section `constexpr bool ends_with( Ch const* x ) const noexcept;`]

* *Returns:* `ends_with( basic_string_view( x ) )`.

[endsect]

[endsect]

[endsect]

[section Searching]

[section find]

[section `constexpr size_type find( basic_string_view str, size_type pos = 0 ) const noexcept;`]

* *Returns:* The lowest position `i` such that `i >= pos` and `substr( i, str.size() ) == str`, or `npos` if such a position doesn't exist.

[endsect]

[section `constexpr size_type find( Ch c, size_type pos = 0 ) const noexcept;`]

* *Returns:* `find( basic_string_view( &c, 1 ), pos )`.

[endsect]

[section `constexpr size_type find( Ch const* s, size_type pos, size_type n ) const noexcept;`]

* *Returns:* `find( basic_string_view( s, n ), pos )`.

[endsect]

[section `constexpr size_type find( Ch const* s, size_type pos = 0 ) const noexcept;`]

* *Returns:* `find( basic_string_view( s ), pos )`.

[endsect]

[endsect]

[section rfind]

[section `constexpr size_type rfind( basic_string_view str, size_type pos = npos ) const noexcept;`]

* *Returns:* The highest position `i` such that `i <= pos` and `substr( i, str.size() ) == str`, or `npos` if such a position doesn't exist.

[endsect]

[section `constexpr size_type rfind( Ch c, size_type pos = npos ) const noexcept;`]

* *Returns:* `rfind( basic_string_view( &c, 1 ), pos )`.

[endsect]

[section `constexpr size_type rfind( Ch const* s, size_type pos, size_type n ) const noexcept;`]

* *Returns:* `rfind( basic_string_view( s, n ), pos )`.

[endsect]

[section `constexpr size_type rfind( Ch const* s, size_type pos = npos ) const noexcept;`]

* *Returns:* `rfind( basic_string_view( s ), pos )`.

[endsect]

[endsect]

[section find_first_of]

[section `constexpr size_type find_first_of( basic_string_view str, size_type pos = 0 ) const noexcept;`]

* *Returns:* The lowest position `i` such that `i >= pos` and the character at position `i` is equal to one of the characters in `str`, or `npos` if such a position doesn't exist.

[endsect]

[section `constexpr size_type find_first_of( Ch c, size_type pos = 0 ) const noexcept;`]

* *Returns:* `find_first_of( basic_string_view( &c, 1 ), pos )`.

[endsect]

[section `constexpr size_type find_first_of( Ch const* s, size_type pos, size_type n ) const noexcept;`]

* *Returns:* `find_first_of( basic_string_view( s, n ), pos )`.

[endsect]

[section `constexpr size_type find_first_of( Ch const* s, size_type pos = 0 ) const noexcept;`]

* *Returns:* `find_first_of( basic_string_view( s ), pos )`.

[endsect]

[endsect]

[section find_last_of]

[section `constexpr size_type find_last_of( basic_string_view str, size_type pos = npos ) const noexcept;`]

* *Returns:* The highest position `i` such that `i <= pos` and the character at position `i` is equal to one of the characters in `str`, or `npos` if such a position doesn't exist.

[endsect]

[section `constexpr size_type find_last_of( Ch c, size_type pos = npos ) const noexcept;`]

* *Returns:* `find_last_of( basic_string_view( &c, 1 ), pos )`.

[endsect]

[section `constexpr size_type find_last_of( Ch const* s, size_type pos, size_type n ) const noexcept;`]

* *Returns:* `find_last_of( basic_string_view( s, n ), pos )`.

[endsect]

[section `constexpr size_type find_last_of( Ch const* s, size_type pos = npos ) const noexcept;`]

* *Returns:* `find_last_of( basic_string_view( s ), pos )`.

[endsect]

[endsect]

[section find_first_not_of]

[section `constexpr size_type find_first_not_of( basic_string_view str, size_type pos = 0 ) const noexcept;`]

* *Returns:* The lowest position `i` such that `i >= pos` and the character at position `i` is not equal to one of the characters in `str`, or `npos` if such a position doesn't exist.

[endsect]

[section `constexpr size_type find_first_not_of( Ch c, size_type pos = 0 ) const noexcept;`]

* *Returns:* `find_first_not_of( basic_string_view( &c, 1 ), pos )`.

[endsect]

[section `constexpr size_type find_first_not_of( Ch const* s, size_type pos, size_type n ) const noexcept;`]

* *Returns:* `find_first_not_of( basic_string_view( s, n ), pos )`.

[endsect]

[section `constexpr size_type find_first_not_of( Ch const* s, size_type pos = 0 ) const noexcept;`]

* *Returns:* `find_first_not_of( basic_string_view( s ), pos )`.

[endsect]

[endsect]

[section find_last_not_of]

[section `constexpr size_type find_last_not_of( basic_string_view str, size_type pos = npos ) const noexcept;`]

* *Returns:* The highest position `i` such that `i <= pos` and the character at position `i` is not equal to one of the characters in `str`, or `npos` if such a position doesn't exist.

[endsect]

[section `constexpr size_type find_last_not_of( Ch c, size_type pos = npos ) const noexcept;`]

* *Returns:* `find_last_not_of( basic_string_view( &c, 1 ), pos )`.

[endsect]

[section `constexpr size_type find_last_not_of( Ch const* s, size_type pos, size_type n ) const noexcept;`]

* *Returns:* `find_last_not_of( basic_string_view( s, n ), pos )`.

[endsect]

[section `constexpr size_type find_last_not_of( Ch const* s, size_type pos = npos ) const noexcept;`]

* *Returns:* `find_last_not_of( basic_string_view( s ), pos )`.

[endsect]

[endsect]

[section contains]

[section `constexpr bool contains( basic_string_view sv ) const noexcept;`]

* *Returns:* `find( sv ) != npos`.

[endsect]

[section `constexpr bool contains( Ch c ) const noexcept;`]

* *Returns:* `find( c ) != npos`.

[endsect]

[section `constexpr bool contains( Ch const* s ) const noexcept;`]

* *Returns:* `find( s ) != npos`.

[endsect]

[endsect]

[endsect]

[section Relational Operators]

[section `constexpr friend bool operator==( basic_string_view sv1, basic_string_view sv2 ) noexcept;`]

* *Returns:* `sv1.compare( sv2 ) == 0`.

[endsect]

[section `constexpr friend bool operator!=( basic_string_view sv1, basic_string_view sv2 ) noexcept;`]

* *Returns:* `sv1.compare( sv2 ) != 0`.

[endsect]

[section `constexpr friend bool operator<( basic_string_view sv1, basic_string_view sv2 ) noexcept;`]

* *Returns:* `sv1.compare( sv2 ) < 0`.

[endsect]

[section `constexpr friend bool operator<=( basic_string_view sv1, basic_string_view sv2 ) noexcept;`]

* *Returns:* `sv1.compare( sv2 ) <= 0`.

[endsect]

[section `constexpr friend bool operator>( basic_string_view sv1, basic_string_view sv2 ) noexcept;`]

* *Returns:* `sv1.compare( sv2 ) > 0`.

[endsect]

[section `constexpr friend bool operator>=( basic_string_view sv1, basic_string_view sv2 ) noexcept;`]

* *Returns:* `sv1.compare( sv2 ) >= 0`.

[endsect]

[endsect]

[section Stream Inserter]

[section `template<class Ch> std::basic_ostream<Ch>& operator<<( std::basic_ostream<Ch>& os, basic_string_view<Ch> str );`]

* *Effects:* equivalent to `os << x`, where `x` is a pointer to a null-terminated character sequence with the same contents as `str`.

[endsect]

[endsect]

[endsect]

[endsect]