std::str: Remove functions count_chars, count_bytes
std::str: Remove functions count_chars, count_bytes

These are very easy to replace with methods on string slices, basically
`.char_len()` and `.len()`.

These are the replacement implementations I did to clean these
functions up, but seeing this I propose removal:

/// ...
pub fn count_chars(s: &str, begin: uint, end: uint) -> uint {
    // .slice() checks the char boundaries
    s.slice(begin, end).char_len()
}

/// Counts the number of bytes taken by the first `n` chars in `s`
/// starting from byte index `begin`.
///
/// Fails if there are less than `n` chars past `begin`
pub fn count_bytes<'b>(s: &'b str, begin: uint, n: uint) -> uint {
    s.slice_from(begin).slice_chars(0, n).len()
}

AerialX/rust-rt-minimal,zubron/rust,vhbit/rust,mahkoh/rust,kwantam/rust,ktossell/rust,rohitjoshi/rust,andars/rust,krzysz00/rust,vhbit/rust,l0kod/rust,aepsil0n/rust,0x73/rust,rohitjoshi/rust,zachwick/rust,krzysz00/rust,aturon/rust,GBGamer/rust,zaeleus/rust,fabricedesre/rust,pshc/rust,Ryman/rust,carols10cents/rust,reem/rust,Ryman/rust,seanrivera/rust,P1start/rust,fabricedesre/rust,seanrivera/rust,defuz/rust,aneeshusa/rust,jroesch/rust,jbclements/rust,XMPPwocky/rust,jbclements/rust,andars/rust,quornian/rust,ktossell/rust,victorvde/rust,mdinger/rust,aidancully/rust,ruud-v-a/rust,aneeshusa/rust,servo/rust,robertg/rust,nwin/rust,SiegeLord/rust,sae-bom/rust,hauleth/rust,0x73/rust,servo/rust,aneeshusa/rust,pczarn/rust,aidancully/rust,defuz/rust,kimroen/rust,carols10cents/rust,untitaker/rust,victorvde/rust,servo/rust,rprichard/rust,AerialX/rust,ebfull/rust,michaelballantyne/rust-gpu,pczarn/rust,servo/rust,pythonesque/rust,barosl/rust,ejjeong/rust,XMPPwocky/rust,emk/rust,graydon/rust,miniupnp/rust,graydon/rust,quornian/rust,ruud-v-a/rust,dinfuehr/rust,ejjeong/rust,ktossell/rust,bombless/rust,gifnksm/rust,pythonesque/rust,quornian/rust,aturon/rust,robertg/rust,emk/rust,LeoTestard/rust,vhbit/rust,bluss/rand,emk/rust,rprichard/rust,emk/rust,AerialX/rust-rt-minimal,gifnksm/rust,fabricedesre/rust,untitaker/rust,KokaKiwi/rust,servo/rust,cllns/rust,pythonesque/rust,aturon/rust,stepancheg/rust-ide-rust,kwantam/rust,jroesch/rust,nwin/rust,graydon/rust,l0kod/rust,XMPPwocky/rust,l0kod/rust,rprichard/rust,hauleth/rust,kwantam/rust,pelmers/rust,erickt/rust,P1start/rust,huonw/rand,servo/rust,barosl/rust,mihneadb/rust,vhbit/rust,bombless/rust,omasanori/rust,mitsuhiko/rust,aepsil0n/rust,robertg/rust,P1start/rust,untitaker/rust,richo/rust,jbclements/rust,nham/rust,LeoTestard/rust,AerialX/rust,AerialX/rust,pshc/rust,barosl/rust,krzysz00/rust,philyoon/rust,mdinger/rust,aepsil0n/rust,vhbit/rust,Ryman/rust,Ryman/rust,pythonesque/rust,Ryman/rust,0x73/rust,michaelballantyne/rust-gpu,jbclements/rust,GBGamer/rust,michaelballantyne/rust-gpu,dwillmer/rust,KokaKiwi/rust,mdinger/rust,michaelballantyne/rust-gpu,TheNeikos/rust,pshc/rust,l0kod/rust,Ryman/rust,pythonesque/rust,AerialX/rust-rt-minimal,KokaKiwi/rust,defuz/rust,cllns/rust,mitsuhiko/rust,mihneadb/rust,barosl/rust,quornian/rust,ruud-v-a/rust,zachwick/rust,pelmers/rust,pelmers/rust,stepancheg/rust-ide-rust,miniupnp/rust,barosl/rust,emk/rust,erickt/rust,quornian/rust,michaelballantyne/rust-gpu,AerialX/rust-rt-minimal,ebfull/rust,philyoon/rust,aepsil0n/rust,omasanori/rust,dwillmer/rust,zachwick/rust,pczarn/rust,pczarn/rust,aidancully/rust,zubron/rust,nham/rust,LeoTestard/rust,michaelballantyne/rust-gpu,victorvde/rust,victorvde/rust,AerialX/rust,stepancheg/rust-ide-rust,XMPPwocky/rust,sae-bom/rust,zachwick/rust,pczarn/rust,pelmers/rust,cllns/rust,mitsuhiko/rust,zubron/rust,nham/rust,erickt/rust,sae-bom/rust,ktossell/rust,aidancully/rust,jashank/rust,ruud-v-a/rust,hauleth/rust,GBGamer/rust,emk/rust,LeoTestard/rust,SiegeLord/rust,reem/rust,untitaker/rust,andars/rust,pythonesque/rust,kwantam/rust,rprichard/rust,ebfull/rust,aepsil0n/rust,mahkoh/rust,richo/rust,carols10cents/rust,pczarn/rust,miniupnp/rust,pshc/rust,jbclements/rust,dwillmer/rust,0x73/rust,dwillmer/rust,gifnksm/rust,mvdnes/rust,jbclements/rust,bombless/rust,bombless/rust-docs-chinese,GBGamer/rust,mihneadb/rust,P1start/rust,LeoTestard/rust,jashank/rust,defuz/rust,sae-bom/rust,cllns/rust,0x73/rust,seanrivera/rust,dwillmer/rust,reem/rust,michaelballantyne/rust-gpu,nham/rust,jroesch/rust,0x73/rust,sae-bom/rust,rohitjoshi/rust,kwantam/rust,zaeleus/rust,mdinger/rust,krzysz00/rust,rohitjoshi/rust,hauleth/rust,mitsuhiko/rust,miniupnp/rust,seanrivera/rust,erickt/rust,P1start/rust,carols10cents/rust,ebfull/rust,victorvde/rust,quornian/rust,mdinger/rust,TheNeikos/rust,omasanori/rust,0x73/rust,pshc/rust,avdi/rust,jashank/rust,zubron/rust,AerialX/rust-rt-minimal,ebfull/rust,omasanori/rust,zubron/rust,l0kod/rust,jbclements/rust,omasanori/rust,waynenilsen/rand,ejjeong/rust,retep998/rand,rprichard/rust,ktossell/rust,mitsuhiko/rust,krzysz00/rust,rprichard/rust,l0kod/rust,SiegeLord/rust,emk/rust,untitaker/rust,seanrivera/rust,bombless/rust,graydon/rust,zubron/rust,rohitjoshi/rust,bombless/rust,fabricedesre/rust,rohitjoshi/rust,mvdnes/rust,robertg/rust,richo/rust,jbclements/rust,aturon/rust,nwin/rust,aidancully/rust,ktossell/rust,omasanori/rust,pshc/rust,mahkoh/rust,dinfuehr/rust,jashank/rust,dinfuehr/rust,TheNeikos/rust,l0kod/rust,zaeleus/rust,GBGamer/rust,aturon/rust,aneeshusa/rust,andars/rust,erickt/rust,jashank/rust,GBGamer/rust,reem/rust,zachwick/rust,gifnksm/rust,dwillmer/rust,mihneadb/rust,carols10cents/rust,dwillmer/rust,miniupnp/rust,vhbit/rust,zaeleus/rust,sae-bom/rust,KokaKiwi/rust,avdi/rust,LeoTestard/rust,zubron/rust,P1start/rust,TheNeikos/rust,hauleth/rust,philyoon/rust,jroesch/rust,gifnksm/rust,aidancully/rust,aturon/rust,servo/rust,ruud-v-a/rust,kimroen/rust,pelmers/rust,ejjeong/rust,quornian/rust,SiegeLord/rust,fabricedesre/rust,seanrivera/rust,erickt/rust,GrahamDennis/rand,jashank/rust,ejjeong/rust,nwin/rust,ruud-v-a/rust,arthurprs/rand,SiegeLord/rust,nham/rust,pshc/rust,fabricedesre/rust,TheNeikos/rust,kimroen/rust,achanda/rand,vhbit/rust,stepancheg/rust-ide-rust,mvdnes/rust,kimroen/rust,ejjeong/rust,robertg/rust,XMPPwocky/rust,mitsuhiko/rust,Ryman/rust,reem/rust,mahkoh/rust,richo/rust,zachwick/rust,jroesch/rust,jroesch/rust,philyoon/rust,AerialX/rust,richo/rust,philyoon/rust,erickt/rust,pczarn/rust,LeoTestard/rust,bhickey/rand,KokaKiwi/rust,robertg/rust,cllns/rust,zaeleus/rust,barosl/rust,GBGamer/rust,andars/rust,ebfull/rand,kimroen/rust,mahkoh/rust,TheNeikos/rust,bombless/rust,mihneadb/rust,victorvde/rust,dinfuehr/rust,ebfull/rust,XMPPwocky/rust,avdi/rust,kwantam/rust,avdi/rust,GBGamer/rust,jbclements/rust,mahkoh/rust,zubron/rust,philyoon/rust,aneeshusa/rust,avdi/rust,shepmaster/rand,kimroen/rust,miniupnp/rust,nham/rust,aneeshusa/rust,vhbit/rust,dinfuehr/rust,reem/rust,cllns/rust,dinfuehr/rust,l0kod/rust,jashank/rust,jashank/rust,KokaKiwi/rust,mdinger/rust,jroesch/rust,aturon/rust,mvdnes/rust,ktossell/rust,SiegeLord/rust,graydon/rust,AerialX/rust,nwin/rust,mvdnes/rust,AerialX/rust-rt-minimal,nwin/rust,mitsuhiko/rust,pelmers/rust,mihneadb/rust,graydon/rust,gifnksm/rust,hauleth/rust,avdi/rust,andars/rust,richo/rust,dwillmer/rust,defuz/rust,untitaker/rust,mvdnes/rust,carols10cents/rust,barosl/rust,zaeleus/rust,jroesch/rust,miniupnp/rust,stepancheg/rust-ide-rust,nham/rust,miniupnp/rust,SiegeLord/rust,krzysz00/rust,pythonesque/rust,nwin/rust,fabricedesre/rust,stepancheg/rust-ide-rust,nwin/rust,kimroen/rust,pshc/rust,defuz/rust,P1start/rust,stepancheg/rust-ide-rust,aepsil0n/rust