• IP_FORWARD


    debug in gdb

     一个QT的学习专栏,看问题的角度。

    QByteArray makes a deep copy of the const char * data, so you can modify it later without experiencing side effects. (If for performance reasons you don't want to take a deep copy of the character data, use QByteArray::fromRawData() instead.)

     at() can be faster than operator[](), because it never causes a deep copy to occur.

    A QByteArray can embed '' bytes. The size() function always returns the size of the whole array, including embedded '' bytes. If you want to obtain the length of the data up to and excluding the first '' character, call qstrlen() on the byte array.

    After a call to resize(), newly allocated bytes have undefined values. To set all the bytes to a particular value, call fill().

    To obtain a pointer to the actual character data, call data() or constData(). These functions return a pointer to the beginning of the data. The pointer is guaranteed to remain valid until a non-const function is called on the QByteArray. It is also guaranteed that the data ends with a '' byte unless the QByteArray was created from a raw data. This '' byte is automatically provided by QByteArray and is not counted in size().

    When you append() data to a non-empty array, the array will be reallocated and the new data copied to it. You can avoid this behavior by calling reserve(), which preallocates a certain amount of memory. You can also call capacity() to find out how much memory QByteArray actually allocated. Data appended to an empty array is not copied.

     If you want to find all occurrences of a particular character or substring in a QByteArray, use indexOf() or lastIndexOf(). The former searches forward starting from a given index position, the latter searches backward. Both return the index position of the character or substring if they find it; otherwise, they return -1. For example, here's a typical loop that finds all occurrences of a particular substring:

     

    MadEdit-0.2.9.1    今天终于摆了UltraEdit   

    还是用这惯。还是要UE

  • 相关阅读:
    Vscode 小白使用介绍
    Vue之父组件向子组件传递方法
    Vue之父组件向子组件传值
    Vue之组件切换
    Vue中组件的data和methods
    Vue之创建组件
    Vue生命周期代码示例
    Vue生命周期示例图
    inline、block和inline-block的区别
    系统测试测试过程
  • 原文地址:https://www.cnblogs.com/iamgoodman/p/3818480.html
Copyright © 2020-2023  润新知