KiCAD pcbnew scripting
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pcbnew.UTF8 Class Reference
Inheritance diagram for pcbnew.UTF8:
Inheritance graph

Public Member Functions

def __init__ (self, args)
def c_str (self)
def empty (self)
def find (self, args)
def clear (self)
def length (self)
def size (self)
def compare (self, s)
def __eq__ (self, args)
def find_first_of
def __iadd__ (self, args)
def substr (self, args)
def wx_str (self)
def utf8_to_wxstring (self)
def begin (self)
def end (self)
def Cast_to_CChar (self)
def GetChars (self)
def __str__ (self)

Public Attributes


Static Public Attributes

 npos = _pcbnew.UTF8_npos

Detailed Description

Class UTF8 is an 8 bit string that is assuredly encoded in UTF8, and
supplies special conversion support to and from wxString, to and from
std::string, and has non-mutating iteration over unicode characters.

I've been careful to supply only conversion facilities and not try and
duplicate wxString() with many member functions. There are multiple
ways to create text into a std::string without the need of too many
member functions:

richio.h's StrPrintf()


Because this class used no virtuals, it should be possible to cast any
std::string into a UTF8 using this kind of cast: ( UTF8 &) without
construction or copying being the effect of the cast. Be sure the
source std::string holds UTF8 encoded text before you do that.

Dick Hollenbeck

C++ includes: utf8.h 

Definition at line 7721 of file

Constructor & Destructor Documentation

def pcbnew.UTF8.__init__ (   self,
__init__(UTF8 self, wxString o) -> UTF8
__init__(UTF8 self, char const * txt) -> UTF8
__init__(UTF8 self, wchar_t const * txt) -> UTF8
__init__(UTF8 self, string o) -> UTF8
__init__(UTF8 self) -> UTF8


Definition at line 7753 of file

Member Function Documentation

def pcbnew.UTF8.__eq__ (   self,
__eq__(UTF8 self, UTF8 rhs) -> bool
__eq__(UTF8 self, string rhs) -> bool
__eq__(UTF8 self, char const * s) -> bool

Definition at line 7840 of file

def pcbnew.UTF8.__iadd__ (   self,
__iadd__(UTF8 self, UTF8 str) -> UTF8
__iadd__(UTF8 self, char ch) -> UTF8
__iadd__(UTF8 self, char const * s) -> UTF8

Definition at line 7861 of file

def pcbnew.UTF8.__str__ (   self)

Definition at line 7929 of file

def pcbnew.UTF8.begin (   self)
begin(UTF8 self) -> std::string::const_iterator

UTF8::begin() const 

Definition at line 7897 of file

def pcbnew.UTF8.c_str (   self)
c_str(UTF8 self) -> char const *

const char* UTF8::c_str() const

Definition at line 7771 of file

def pcbnew.UTF8.Cast_to_CChar (   self)
Cast_to_CChar(UTF8 self) -> char const *

Definition at line 7917 of file

Here is the caller graph for this function:

def pcbnew.UTF8.clear (   self)
clear(UTF8 self)

void UTF8::clear() 

Definition at line 7801 of file

def (   self,
compare(UTF8 self, string s) -> int

int UTF8::compare(const
std::string &s) const 

Definition at line 7830 of file

def pcbnew.UTF8.empty (   self)
empty(UTF8 self) -> bool

bool UTF8::empty() const 

Definition at line 7781 of file

def pcbnew.UTF8.end (   self)
end(UTF8 self) -> std::string::const_iterator

UTF8::end() const 

Definition at line 7907 of file

def pcbnew.UTF8.find (   self,
find(UTF8 self, char c) -> std::string::size_type
find(UTF8 self, char c, size_t & s) -> std::string::size_type

UTF8::find(char c, size_t &s) const 

Definition at line 7790 of file

def pcbnew.UTF8.find_first_of (   self,
  pos = 0 
find_first_of(UTF8 self, string str, std::string::size_type pos=0) -> std::string::size_type
find_first_of(UTF8 self, string str) -> std::string::size_type

UTF8::find_first_of(const std::string &str, std::string::size_type
pos=0) const 

Definition at line 7849 of file

def pcbnew.UTF8.GetChars (   self)

Definition at line 7924 of file

Here is the caller graph for this function:

def pcbnew.UTF8.length (   self)
length(UTF8 self) -> std::string::size_type

UTF8::length() const 

Definition at line 7810 of file

def pcbnew.UTF8.size (   self)
size(UTF8 self) -> std::string::size_type

UTF8::size() const 

Definition at line 7820 of file

def pcbnew.UTF8.substr (   self,
substr(UTF8 self, size_t pos=0, size_t len) -> string
substr(UTF8 self, size_t pos=0) -> string
substr(UTF8 self) -> string

std::string UTF8::substr(size_t
pos=0, size_t len=npos) const 

Definition at line 7871 of file

def pcbnew.UTF8.utf8_to_wxstring (   self)
utf8_to_wxstring(UTF8 self) -> wxString

Definition at line 7892 of file

def pcbnew.UTF8.wx_str (   self)
wx_str(UTF8 self) -> wxString

wxString UTF8::wx_str() const 

Definition at line 7883 of file

Member Data Documentation

pcbnew.UTF8.npos = _pcbnew.UTF8_npos

Definition at line 7869 of file


Definition at line 7767 of file

The documentation for this class was generated from the following file: