⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perlapi.pod

📁 MSYS在windows下模拟了一个类unix的终端
💻 POD
📖 第 1 页 / 共 5 页
字号:
Clear an SV, making it empty. Does not free the memory used by the SVitself.	void	sv_clear(SV* sv)=for hackersFound in file sv.c=item sv_cmpCompares the strings in two SVs.  Returns -1, 0, or 1 indicating whether thestring in C<sv1> is less than, equal to, or greater than the string inC<sv2>.	I32	sv_cmp(SV* sv1, SV* sv2)=for hackersFound in file sv.c=item sv_cmp_localeCompares the strings in two SVs in a locale-aware manner. SeeL</sv_cmp_locale>	I32	sv_cmp_locale(SV* sv1, SV* sv2)=for hackersFound in file sv.c=item sv_decAuto-decrement of the value in the SV.	void	sv_dec(SV* sv)=for hackersFound in file sv.c=item sv_derived_fromReturns a boolean indicating whether the SV is derived from the specifiedclass.  This is the function that implements C<UNIVERSAL::isa>.  It worksfor class names as well as for objects.	bool	sv_derived_from(SV* sv, const char* name)=for hackersFound in file universal.c=item sv_eqReturns a boolean indicating whether the strings in the two SVs areidentical.	I32	sv_eq(SV* sv1, SV* sv2)=for hackersFound in file sv.c=item sv_freeFree the memory used by an SV.	void	sv_free(SV* sv)=for hackersFound in file sv.c=item sv_getsGet a line from the filehandle and store it into the SV, optionallyappending to the currently-stored string.	char*	sv_gets(SV* sv, PerlIO* fp, I32 append)=for hackersFound in file sv.c=item sv_growExpands the character buffer in the SV.  This will use C<sv_unref> and willupgrade the SV to C<SVt_PV>.  Returns a pointer to the character buffer.Use C<SvGROW>.	char*	sv_grow(SV* sv, STRLEN newlen)=for hackersFound in file sv.c=item sv_incAuto-increment of the value in the SV.	void	sv_inc(SV* sv)=for hackersFound in file sv.c=item sv_insertInserts a string at the specified offset/length within the SV. Similar tothe Perl substr() function.	void	sv_insert(SV* bigsv, STRLEN offset, STRLEN len, char* little, STRLEN littlelen)=for hackersFound in file sv.c=item sv_isaReturns a boolean indicating whether the SV is blessed into the specifiedclass.  This does not check for subtypes; use C<sv_derived_from> to verifyan inheritance relationship.	int	sv_isa(SV* sv, const char* name)=for hackersFound in file sv.c=item sv_isobjectReturns a boolean indicating whether the SV is an RV pointing to a blessedobject.  If the SV is not an RV, or if the object is not blessed, then thiswill return false.	int	sv_isobject(SV* sv)=for hackersFound in file sv.c=item sv_lenReturns the length of the string in the SV.  See also C<SvCUR>.	STRLEN	sv_len(SV* sv)=for hackersFound in file sv.c=item sv_len_utf8Returns the number of characters in the string in an SV, counting wideUTF8 bytes as a single character.	STRLEN	sv_len_utf8(SV* sv)=for hackersFound in file sv.c=item sv_magicAdds magic to an SV.	void	sv_magic(SV* sv, SV* obj, int how, const char* name, I32 namlen)=for hackersFound in file sv.c=item sv_mortalcopyCreates a new SV which is a copy of the original SV.  The new SV is markedas mortal.	SV*	sv_mortalcopy(SV* oldsv)=for hackersFound in file sv.c=item sv_newmortalCreates a new SV which is mortal.  The reference count of the SV is set to 1.	SV*	sv_newmortal()=for hackersFound in file sv.c=item sv_pvn_forceGet a sensible string out of the SV somehow.	char*	sv_pvn_force(SV* sv, STRLEN* lp)=for hackersFound in file sv.c=item sv_pvutf8n_forceGet a sensible UTF8-encoded string out of the SV somehow. SeeL</sv_pvn_force>.	char*	sv_pvutf8n_force(SV* sv, STRLEN* lp)=for hackersFound in file sv.c=item sv_reftypeReturns a string describing what the SV is a reference to.	char*	sv_reftype(SV* sv, int ob)=for hackersFound in file sv.c=item sv_replaceMake the first argument a copy of the second, then delete the original.	void	sv_replace(SV* sv, SV* nsv)=for hackersFound in file sv.c=item sv_rvweakenWeaken a reference.	SV*	sv_rvweaken(SV *sv)=for hackersFound in file sv.c=item sv_setivCopies an integer into the given SV.  Does not handle 'set' magic.  SeeC<sv_setiv_mg>.	void	sv_setiv(SV* sv, IV num)=for hackersFound in file sv.c=item sv_setiv_mgLike C<sv_setiv>, but also handles 'set' magic.	void	sv_setiv_mg(SV *sv, IV i)=for hackersFound in file sv.c=item sv_setnvCopies a double into the given SV.  Does not handle 'set' magic.  SeeC<sv_setnv_mg>.	void	sv_setnv(SV* sv, NV num)=for hackersFound in file sv.c=item sv_setnv_mgLike C<sv_setnv>, but also handles 'set' magic.	void	sv_setnv_mg(SV *sv, NV num)=for hackersFound in file sv.c=item sv_setpvCopies a string into an SV.  The string must be null-terminated.  Does nothandle 'set' magic.  See C<sv_setpv_mg>.	void	sv_setpv(SV* sv, const char* ptr)=for hackersFound in file sv.c=item sv_setpvfProcesses its arguments like C<sprintf> and sets an SV to the formattedoutput.  Does not handle 'set' magic.  See C<sv_setpvf_mg>.	void	sv_setpvf(SV* sv, const char* pat, ...)=for hackersFound in file sv.c=item sv_setpvf_mgLike C<sv_setpvf>, but also handles 'set' magic.	void	sv_setpvf_mg(SV *sv, const char* pat, ...)=for hackersFound in file sv.c=item sv_setpvivCopies an integer into the given SV, also updating its string value.Does not handle 'set' magic.  See C<sv_setpviv_mg>.	void	sv_setpviv(SV* sv, IV num)=for hackersFound in file sv.c=item sv_setpviv_mgLike C<sv_setpviv>, but also handles 'set' magic.	void	sv_setpviv_mg(SV *sv, IV iv)=for hackersFound in file sv.c=item sv_setpvnCopies a string into an SV.  The C<len> parameter indicates the number ofbytes to be copied.  Does not handle 'set' magic.  See C<sv_setpvn_mg>.	void	sv_setpvn(SV* sv, const char* ptr, STRLEN len)=for hackersFound in file sv.c=item sv_setpvn_mgLike C<sv_setpvn>, but also handles 'set' magic.	void	sv_setpvn_mg(SV *sv, const char *ptr, STRLEN len)=for hackersFound in file sv.c=item sv_setpv_mgLike C<sv_setpv>, but also handles 'set' magic.	void	sv_setpv_mg(SV *sv, const char *ptr)=for hackersFound in file sv.c=item sv_setref_ivCopies an integer into a new SV, optionally blessing the SV.  The C<rv>argument will be upgraded to an RV.  That RV will be modified to point tothe new SV.  The C<classname> argument indicates the package for theblessing.  Set C<classname> to C<Nullch> to avoid the blessing.  The new SVwill be returned and will have a reference count of 1.	SV*	sv_setref_iv(SV* rv, const char* classname, IV iv)=for hackersFound in file sv.c=item sv_setref_nvCopies a double into a new SV, optionally blessing the SV.  The C<rv>argument will be upgraded to an RV.  That RV will be modified to point tothe new SV.  The C<classname> argument indicates the package for theblessing.  Set C<classname> to C<Nullch> to avoid the blessing.  The new SVwill be returned and will have a reference count of 1.	SV*	sv_setref_nv(SV* rv, const char* classname, NV nv)=for hackersFound in file sv.c=item sv_setref_pvCopies a pointer into a new SV, optionally blessing the SV.  The C<rv>argument will be upgraded to an RV.  That RV will be modified to point tothe new SV.  If the C<pv> argument is NULL then C<PL_sv_undef> will be placedinto the SV.  The C<classname> argument indicates the package for theblessing.  Set C<classname> to C<Nullch> to avoid the blessing.  The new SVwill be returned and will have a reference count of 1.Do not use with other Perl types such as HV, AV, SV, CV, because thoseobjects will become corrupted by the pointer copy process.Note that C<sv_setref_pvn> copies the string while this copies the pointer.	SV*	sv_setref_pv(SV* rv, const char* classname, void* pv)=for hackersFound in file sv.c=item sv_setref_pvnCopies a string into a new SV, optionally blessing the SV.  The length of thestring must be specified with C<n>.  The C<rv> argument will be upgraded toan RV.  That RV will be modified to point to the new SV.  The C<classname>argument indicates the package for the blessing.  Set C<classname> toC<Nullch> to avoid the blessing.  The new SV will be returned and will havea reference count of 1.Note that C<sv_setref_pv> copies the pointer while this copies the string.	SV*	sv_setref_pvn(SV* rv, const char* classname, char* pv, STRLEN n)=for hackersFound in file sv.c=item sv_setsvCopies the contents of the source SV C<ssv> into the destination SV C<dsv>.The source SV may be destroyed if it is mortal.  Does not handle 'set'magic.  See the macro forms C<SvSetSV>, C<SvSetSV_nosteal> andC<sv_setsv_mg>.	void	sv_setsv(SV* dsv, SV* ssv)=for hackersFound in file sv.c=item sv_setsv_mgLike C<sv_setsv>, but also handles 'set' magic.	void	sv_setsv_mg(SV *dstr, SV *sstr)=for hackersFound in file sv.c=item sv_setuvCopies an unsigned integer into the given SV.  Does not handle 'set' magic.See C<sv_setuv_mg>.	void	sv_setuv(SV* sv, UV num)=for hackersFound in file sv.c=item sv_setuv_mgLike C<sv_setuv>, but also handles 'set' magic.	void	sv_setuv_mg(SV *sv, UV u)=for hackersFound in file sv.c=item sv_trueReturns true if the SV has a true value by Perl's rules.	I32	sv_true(SV *sv)=for hackersFound in file sv.c=item sv_unmagicRemoves magic from an SV.	int	sv_unmagic(SV* sv, int type)=for hackersFound in file sv.c=item sv_unrefUnsets the RV status of the SV, and decrements the reference count ofwhatever was being referenced by the RV.  This can almost be thought ofas a reversal of C<newSVrv>.  See C<SvROK_off>.	void	sv_unref(SV* sv)=for hackersFound in file sv.c=item sv_upgradeUpgrade an SV to a more complex form.  Use C<SvUPGRADE>.  SeeC<svtype>.	bool	sv_upgrade(SV* sv, U32 mt)=for hackersFound in file sv.c=item sv_usepvnTells an SV to use C<ptr> to find its string value.  Normally the string isstored inside the SV but sv_usepvn allows the SV to use an outside string. The C<ptr> should point to memory that was allocated by C<malloc>.  Thestring length, C<len>, must be supplied.  This function will realloc thememory pointed to by C<ptr>, so that pointer should not be freed or used bythe programmer after giving it to sv_usepvn.  Does not handle 'set' magic.See C<sv_usepvn_mg>.	void	sv_usepvn(SV* sv, char* ptr, STRLEN len)=for hackersFound in file sv.c=item sv_usepvn_mgLike C<sv_usepvn>, but also handles 'set' magic.	void	sv_usepvn_mg(SV *sv, char *ptr, STRLEN len)=for hackersFound in file sv.c=item sv_utf8_downgradeAttempt to convert the PV of an SV from UTF8-encoded to byte encoding.This may not be possible if the PV contains non-byte encoding characters;if this is the case, either returns false or, if C<fail_ok> is nottrue, croaks.NOTE: this function is experimental and may change or beremoved without notice.	bool	sv_utf8_downgrade(SV *sv, bool fail_ok)=for hackersFound in file sv.c=item sv_utf8_encodeConvert the PV of an SV to UTF8-encoded, but then turn off the C<SvUTF8>flag so that it looks like bytes again. Nothing calls this. NOTE: this function is experimental and may change or beremoved without notice.	void	sv_utf8_encode(SV *sv)=for hackersFound in file sv.c=item sv_utf8_upgradeConvert the PV of an SV to its UTF8-encoded form.NOTE: this function is experimental and may change or beremoved without notice.	void	sv_utf8_upgrade(SV *sv)=for hackersFound in file sv.c=item sv_vcatpvfnProcesses its arguments like C<vsprintf> and appends the formatted outputto an SV.  Uses an array of SVs if the C style variable argument list ismissing (NULL).  When running with taint checks enabled, indicates viaC<maybe_tainted> if results are untrustworthy (often due to the use oflocales).	void	sv_vcatpvfn(SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted)=for hackersFound in file sv.c=item sv_vsetpvfnWorks like C<vcatpvfn> but copies the text into the SV instead ofappending it.	void	sv_vsetpvfn(SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted)=for hackersFound in file sv.c=item THISVariable which is setup by C<xsubpp> to designate the object in a C++ XSUB.  This is always the proper type for the C++ object.  See C<CLASS> and L<perlxs/"Using XS With C++">.	(whatever)	THIS=for hackersFound in file XSUB.h=item toLOWERConverts the specified character to lowercase.	char	toLOWER(char ch)=for hackersFound in file handy.h=item toUPPERConverts the specified character to uppercase.	char	toUPPER(char ch)=for hackersFound in file handy.h=item utf8_distanceReturns the number of UTF8 characters between the UTF-8 pointers C<a>and C<b>.WARNING: use only if you *know* that the pointers point inside thesame UTF-8 buffer.NOTE: this function is experimental and may change or beremoved without notice.	IV	utf8_distance(U8 *a, U8 *b)=for hackersFound in file utf8.c=item utf8_hopReturn the UTF-8 pointer C<s> displaced by C<off> characters, eitherforward or backward.WARNING: do not use the following unless you *know* C<off> is withinthe UTF-8 data pointed to by C<s> *and* that on entry C<s> is alignedon the first byte of character or just after the last byte of a character.NOTE: this function is experimental and may change or beremoved without notice.	U8*	utf8_hop(U8 *s, I32 off)=for hackersFound in file utf8.c=item utf8_lengthReturn the length of the UTF-8 char encoded string C<s> in characters.Stops at C<e> (inclusive).  If C<e E<lt> s> or if the scan would endup past C<e>, croaks.NOTE: this function is experimental and may change or beremoved without notice.	STRLEN	utf8_length(U8* s, U8 *e)=for hackersFound in file utf8.c=item utf8_to_bytesConverts a string C<s> of length C<len> from UTF8 into byte encoding.Unlike C<byt

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -