VectorView



  1. Vector Viewer For Mac
  2. Vector Viewer Program
  3. Vectorview
  4. Vector Views

VectorView supports all types of EPS, Ai, SVG and SWF files. There are several drawing programs and vector graphic editing applications that supports EPS, Ai, SVG and SWF file extensions and these file are usually used as a standard means for transferring image data between different operating systems (Windows, Linux, macOS). VectorView allows you open and view CorelDRAW files on iPhone and iPad. To open cdr files, click Copy to CDRViewer from any app like Mail, WhatsApp, Telegram, WeChat or just send cdr files from.

-->

Definition

Represents an immutable view into a vector.

.NETThis interface appears to .NET code as System.Collections.Generic.IReadOnlyList due to .NET language projection. In any case where a Windows Runtime type has implemented IVectorView<T>, .NET code can use the APIs of IReadOnlyList instead.

Type Parameters

T
Attributes
Implements

Vector Viewer For Mac

IEnumerable<T>

Windows 10 requirements

Vector Viewer Program

Device family
API contract
Windows.Foundation.FoundationContract (introduced in v1.0)

Remarks

VectorView

For read-write collections, the IVectorView<T> interface is still relevant, because the IVector.GetView method returns an IVectorView<T> instance.

When programming with .NET, this interface is hidden and developers should use the interface if they want to implement a read-only vector/list type. In any case where a Windows Runtime type has implemented IVectorView<T>, .NET code can use the APIs of instead. This includes all the existing Windows Runtime API and also scenarios such as using the APIs of Windows Runtime components originally implemented in Visual C++ component extensions (C++/CX) from a C# or Visual Basic app.

Interface inheritance

IVectorView inherits IIterable. Types that implement IVectorView also implement the interface members of IIterable. Similarly, if you're using .NET, there is support for IEnumerable.

Properties

Size

Gets the number of items in the vector view.

Methods

GetAt(UInt32)

Returns the item at the specified index in the vector view.

GetMany(UInt32, T[])

Gets a collection of items from the vector view beginning at the given index.

IndexOf(T, UInt32)

Retrieves the index of a specified item in the vector view.

Applies to

< cpp‎ | string
C++
Language
Standard Library Headers
Freestanding and hosted implementations
Named requirements
Language support library
Concepts library(C++20)
Diagnostics library
Utilities library
Strings library
Containers library
Iterators library
Ranges library(C++20)
Algorithms library
Numerics library
Localizations library
Input/output library
Filesystem library(C++17)
Regular expressions library(C++11)
Atomic operations library(C++11)
Thread support library(C++11)
Technical Specifications
Strings library
Null-terminated strings
Byte strings
Multibyte strings
Wide strings
Classes
(C++17)
std::basic_string_view
Member functions
Iterators
Element access
Capacity
Modifiers
Operations
(C++20)
(C++20)
(C++23)
Constants
Non-member functions
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
Helper classes
Deduction guides(C++20)
Defined in header <string_view>
template<

class CharT,
class Traits =std::char_traits<CharT>

>class basic_string_view;
(since C++17)

The class template basic_string_view describes an object that can refer to a constant contiguous sequence of char-like objects with the first element of the sequence at position zero.

A typical implementation holds only two members: a pointer to constant CharT and a size.

Several typedefs for common character types are provided:

Type Definition
std::string_viewstd::basic_string_view<char>
std::wstring_viewstd::basic_string_view<wchar_t>
std::u8string_view(C++20)std::basic_string_view<char8_t>
std::u16string_viewstd::basic_string_view<char16_t>
std::u32string_viewstd::basic_string_view<char32_t>

Contents

  • 3Member functions
  • 5Non-member functions

[edit]Template parameters

CharT - character type
Traits -CharTraits class specifying the operations on the character type. Like for basic_string, Traits::char_type must name the same type as CharT or the program is ill-formed.

[edit]Member types

View
Member type Definition
traits_typeTraits
value_typeCharT
pointerCharT*
const_pointerconst CharT*
referenceCharT&
const_referenceconst CharT&
const_iterator implementation-defined constant LegacyRandomAccessIterator, ConstexprIterator(since C++20) and LegacyContiguousIterator whose value_type is CharT
iteratorconst_iterator
const_reverse_iteratorstd::reverse_iterator<const_iterator>
reverse_iteratorconst_reverse_iterator
size_typestd::size_t
difference_typestd::ptrdiff_t

Note: iterator and const_iterator are the same type because string views are views into constant character sequences.

All requirements on the iterator types of a Container applies to the iterator and const_iterator types of basic_string_view as well.

[edit]Member functions

Constructors and assignment
constructs a basic_string_view
(public member function)[edit]
assigns a view
(public member function)[edit]
Iterators
returns an iterator to the beginning
(public member function)[edit]
returns an iterator to the end
(public member function)[edit]
returns a reverse iterator to the beginning
(public member function)[edit]
returns a reverse iterator to the end
(public member function)[edit]
Element access
accesses the specified character
(public member function)[edit]
accesses the specified character with bounds checking
(public member function)[edit]
accesses the first character
(public member function)[edit]
accesses the last character
(public member function)[edit]
returns a pointer to the first character of a view
(public member function)[edit]
Capacity
returns the number of characters
(public member function)[edit]
returns the maximum number of characters
(public member function)[edit]
checks whether the view is empty
(public member function)[edit]
Modifiers
shrinks the view by moving its start forward
(public member function)[edit]
shrinks the view by moving its end backward
(public member function)[edit]
swaps the contents
(public member function)[edit]
Operations
copies characters
(public member function)[edit]
returns a substring
(public member function)[edit]
compares two views
(public member function)[edit]
(C++20)
checks if the string view starts with the given prefix
(public member function)[edit]
(C++20)
checks if the string view ends with the given suffix
(public member function)[edit]
(C++23)
checks if the string view contains the given substring or character
(public member function)[edit]
find characters in the view
(public member function)[edit]
find the last occurrence of a substring
(public member function)[edit]
find first occurrence of characters
(public member function)[edit]
find last occurrence of characters
(public member function)[edit]
find first absence of characters
(public member function)[edit]
find last absence of characters
(public member function)[edit]

Constants

[static]
special value. The exact meaning depends on the context
(public static member constant)[edit]

[edit]Non-member functions

(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(C++20)
lexicographically compares two string views
(function template)[edit]
Input/output
performs stream output on string views
(function template)[edit]

Vectorview

[edit]Literals

Defined in inline namespace std::literals::string_view_literals
(C++17)
Creates a string view of a character array literal
(function)[edit]

[edit]Helper classes

hash support for string views
(class template specialization)[edit]

[edit]Helper templates

Vector Views

template<class CharT, class Traits>
inlineconstexprboolranges::enable_borrowed_range<std::basic_string_view<CharT, Traits>>=true;
(since C++20)

This specialization of std::ranges::enable_borrowed_range makes basic_string_view satisfy borrowed_range.

template<class CharT, class Traits>
inlineconstexprboolranges::enable_view<std::basic_string_view<CharT, Traits>>=true;
(since C++20)

This specialization of std::ranges::enable_view makes basic_string_view satisfy view.

[edit]Deduction guides(since C++20)

Vector view of dodge viper

[edit]Notes

It is the programmer's responsibility to ensure that std::string_view does not outlive the pointed-to character array:

[edit]Example

VectorView

Output:

VectorView

[edit]See also

stores and manipulates sequences of characters
(class template)[edit]
(C++20)
a non-owning view over a contiguous sequence of objects
(class template)[edit]
(C++11)
creates a temporary array in list-initialization and then references it
(class template)[edit]
Retrieved from 'https://en.cppreference.com/mwiki/index.php?title=cpp/string/basic_string_view&oldid=127293'